$符号在VBA中有什么作用? [英] What does the $ symbol do in VBA?
本文介绍了$符号在VBA中有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如:
variable1=Dir$(some_path)
对比
variable1=Dir(some_path)
有什么区别?
为什么不这样做:
variable1=string(Dir(some_path))
推荐答案
这是数据类型备忘单
变量结尾为:
$ : String
% : Integer (Int16)
& : Long (Int32)
! : Single
# : Double
@ : Decimal
开始于:
&H : Hex
&O : Octal
VB 和 VB.Net 的比较(参考)
Comparison between VB and VB.Net (reference)
Visual Studio .Net 添加了文字类型(参考)
Visual Studio .Net added Literal Types (reference)
值以:(更完整的列表,请参阅参考)
Value End with: (For more complete list, refer the the reference)
S : Short (Int16)
I : Integer (Int32)
L : Long (Int64)
F : Single
R : Double
D : Decimal
这篇关于$符号在VBA中有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文