'***********************************************************
'VBScript变量命名编码规范
'Subtype Prefix Example
'Boolean bln blnFound
'Byte byt bytRasterData
'Date (Time) dtm dtmStart
'Double dbl dblTolerance
'Error err err OrderNum
'Integer int intQuantity
'Long lng lngDistance
'Object obj objCurrent
'Single sng sngAverage
'String str strFirstName
'*************************************************************
'1.第一个脚本
'第一个VBSciprt程序,在屏幕上打印hello VBScript
'使用文本编辑器,输出下面的内容,保存文件名称为hello.vbs
'运行脚本cscript.exe hello.vbs
Wscript.echo "hello VBScript"
'2.数据类型
'使用布尔类型
dim blnBool
blnBool = True
'根据blnBool的值,输出不同的结果
If blnBool = True then
Wscript.echo "True"
else
Wscript.echo "False"
End If 


本文介绍了VBScript中变量的命名规范及基本数据类型的使用方法,并通过示例展示了如何声明变量及根据布尔变量的值输出不同结果。
644

被折叠的 条评论
为什么被折叠?



