将数字或字符串表达式转换为64位整数(
LongInt)
语法
用法
result = CLngInt( numeric expression )
result = CLngInt( string expression )
result = CLngInt( user defined type )
参数
expression
datatype
任何数字,字符串或指针数据类型
typename
用户定义的类型
返回值
说明
CLngInt函数舍入小数部分,并返回64位
LongInt值。该函数不检查溢出,并且对于小于
223372036854775808或大于
223372036854775807#.
The name can be explained as 'Convert to LoNG INTeger'.
If the argument is a string expression, it is converted to numeric by using ValLng.
例子
'使用CLNGINT函数转换数值
'创建一个LONG INTEGER变量
Dim numeric_value As LongInt
'转换数值
numeric_value = CLngInt(-12345678.123)
'打印结果,应该返回-12345678
Print numeric_value
Sleep
方言差异
与QB差别
参考