VB基础——变量和数据类型

vb中可以不声明变量,直接使用,但这不是一个好习惯。所以使用前还是声明一下: Dim a As Integer 也可以不指明类型,相当于一个泛型,但是会占用更多的空间,效率也会降低 Dim b

常用的数据类型 Byte,Boolean,Integer,Long,Double,String

强制类型转换函数 CByte(expression) CBool(expression) CInt(expression) CLng(expression) CStr(expression) CDbl(expression)

你可能感兴趣的:(String,Integer,vb,byte)