Hàm VBScript CInt

❮ Toàn bộ tài liệu tham khảo VBScript

Hàm CInt chuyển đổi một biểu thức thành kiểu Số nguyên.

Lưu ý: Giá trị phải là một số từ -32768 đến 32767.

Cú pháp

CInt(expression)
Parameter Description
expression Required. Any valid expression

Thí dụ

Thí dụ

<%

response.write(CInt("300") & "<br />")
response.write(CInt(36.75) & "<br />")
response.write(CInt(-67) & "<br />")

%>

Đầu ra của đoạn mã trên sẽ là:

300
37
-67

❮ Toàn bộ tài liệu tham khảo VBScript