whats & means in VB??
I have a question here...it may be simple to some but is bothering me...
whats the function of & in VB? some times I see assignment statements like x& = .....
In graphics programming, whenever we need to get the RGB value, we use &H100& and &H10000<---for this case, how come there is no & at the end of the hexa, just like &H100&?? In RGB case, &H i believe it means Hexa right? what about binary?
Thanks alot for your time guys...
The & after a variable declares the variable a long, after a number "forces" the type of the number to be Long
dim i& ''is the equivalent of "dim i as long"
i = &hFFFF '' &hFFFF is a short (because the default is Integer), so i = -1
i = &hFFFF& '' &hFFFF& is a long, so i = 65535
"There are two ways to write error-free programs. Only the third one works."
The '&' character is also used to concatenate things in VB.
Dim a As String
Dim b As String
a = "This is "
b = "an example."
Label1.Caption = a & b
The caption on the label would be: This is an example.
By Jeff Johnson in forum .NET
Last Post: 01-18-2007, 08:44 AM
By Glen Kunene in forum Talk to the Editors
Last Post: 03-23-2002, 01:43 AM
Last Post: 04-17-2001, 01:45 AM
By Allison Boughton in forum VB Classic
Last Post: 03-05-2001, 01:27 PM
By David McCarter in forum vb.announcements
Last Post: 07-24-2000, 01:06 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center