1

I 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.

MarkJ
  • 30,070
  • 5
  • 68
  • 111
Yogini Mane
  • 185
  • 2
  • 2
  • 8

1 Answers1

6

http://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
Shawn Balestracci
  • 7,380
  • 1
  • 34
  • 52
  • Thanks for quick replies. Yes '!' signify datatype as single. We can enforce the datatype for variables using char or sing. Here value(i.e. 0) plus ! mentioned, so what 0!(zero+!) means exactly? – Yogini Mane Apr 17 '13 at 06:20
  • It means 0 as represented by the 'single' data type – Rob Apr 18 '13 at 09:42