Latest web development tutorials

VBScript CInt Function

VBScript Reference Complete VBScript Reference

CInt function converts an expression to an integer (Integer) type.

Note: The value must be a number between -32768 and 32767.

grammar

CInt(expression)

参数 描述
expression 必需。任何有效的表达式。

Examples

Examples

<script type="text/vbscript">

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

</script>

Examples of the above output:

300
37
-67

try it"

VBScript Reference Complete VBScript Reference