这个问题在这里已经有了答案:
做什么 ! 和#意味着什么时候附加到VB6中的数字? 3个答案我发现了一个代码,在IF条件为0的情况下! 与用户输入的值相比较。 我试着'0!' 即时窗口中的值,它仅返回0。
所以,我想知道'!' 正好签名?
提前致谢。
This question already has an answer here:
What do ! and # mean when attached to numbers in VB6? 3 answersI have found a code where in IF condition 0! compared to the user entered value. I tried with '0!' value in immediate window and it is returning 0 only.
So, I want to to know what '!' sign exactly for??
Thanks in advance.
最满意答案
http://msdn.microsoft.com/en-us/library/s9cz43ek(v=vs.80).aspx
它强制文字0的类型为Single。
另请参阅: http : //msdn.microsoft.com/en-us/library/dzy06xhf.aspx关于附加类型字符。
0! 表示它是一个浮点数(Single)而不是一个整数。
typeOf 0! is Single typeOf 0 is Integerhttp://msdn.microsoft.com/en-us/library/s9cz43ek(v=vs.80).aspx
It forces the type of the literal 0 to be Single.
See also: http://msdn.microsoft.com/en-us/library/dzy06xhf.aspx about appended type characters.
0! indicates it is a floating point number (Single) instead of an integer.
typeOf 0! is Single typeOf 0 is Integer更多推荐
发布评论