Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

A tip/trick about Type Character

5.00/5 (3 votes)
3 Feb 2011CPOL 14.1K  
Type Character
While looking at some old code, I found surprising behavior in my IDE.

I found value = -1000.25623! in the code. I changed the value to -1000.25626 and it automatically changed to -1000.25629.

I tried to search what it could be with no success. Then I suddenly pointed at ! and found the tooltip.

Single
Represents a single-precision floating-point number.


So ! was representing a single value. The above line represents the following block.
VB
Dim temp As Single
Dim value As Double
temp = -1000.25626
value = temp


More Type Characters[^] [Thanks to Dave[^]]

*It may not be a tip/trick, but it is definitely the piece worth sharing.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)