Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy question 2

Status
Not open for further replies.

intrex

IS-IT--Management
Apr 14, 2002
70
US
what do the % and & symbols mean when used as below

dim val as integer
dim value as long

val% = value& And 10
 
The % identifies the value as an Integer (Int32) and the & a long (Int64). Identifying data types this way isn't used much in VB anymore.
 
% = Integer Type Character
& = Long Type Character

All I can see that they do is enforce the type of the variable that precedes them. Thus, val% would cause a compile-time error if it didn't contain an int. This would keep a programmer from invoking lots of automatic type-casting operations; press CTRL-ALT-F2 and type in "% identifier type character" for more information.

Ben

"If thine enemy offend thee, give his child a drum." - Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top