|
-
Jan 25th, 2003, 02:32 AM
#1
what exactly does & mean?
Const ENABLE_LINE_INPUT As Integer = &H2
Const ENABLE_ECHO_INPUT As Integer = &H4
Private Const STD_INPUT_HANDLE = -10&
what does & mean when it's used for numbers?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jan 27th, 2003, 02:30 AM
#2
Registered User
&H means that a hex number is following.
-
Jan 27th, 2003, 02:34 AM
#3
Originally posted by Athley
&H means that a hex number is following.
I still dont get it
what does 10& mean? when I check the variable's value it's just 10.... btw I found that on a website.
umm can you explain more plz
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jan 27th, 2003, 02:46 AM
#4
Registered User
&H is the only one I've seen, so I don't have an answerer to what 10& means, sorry.
-
Jan 27th, 2003, 02:51 AM
#5
The &H prefix means a hex number is following, while a & suffix was used in vb6 to indicate the number was a long integer. What it is used for in VB.NET I don't know.
PS. The ampersand can be used for string concatination as well.
-
Jan 27th, 2003, 12:34 PM
#6
PowerPoster
To create a long constant use this:
Public Const MyLong = 45L ' Forces data type to be a Long.
That is from the MSDN library at this address:
http://msdn.microsoft.com/library/de...eDescribed.asp
-
Jan 27th, 2003, 03:00 PM
#7
It appears the ampersand suffix still forces the constant to be of the Long datatype. But because a Long is 64 bit in .NET, conversions from VB6 have to be done with care. If the constant should be forced to be 32 bit (like a long in VB6), you have to use the % sign instead (the type character for an integer)
So the VB6 code:
Private Const STD_INPUT_HANDLE = -10&
should be converted to VB.NET like this:
Private Const STD_INPUT_HANDLE = -10%
-
Jan 27th, 2003, 03:26 PM
#8
Originally posted by Frans C
It appears the ampersand suffix still forces the constant to be of the Long datatype. But because a Long is 64 bit in .NET, conversions from VB6 have to be done with care. If the constant should be forced to be 32 bit (like a long in VB6), you have to use the % sign instead (the type character for an integer)
So the VB6 code:
Private Const STD_INPUT_HANDLE = -10&
should be converted to VB.NET like this:
Private Const STD_INPUT_HANDLE = -10%
then why not just say
Private const STR_INPUT_HDNALE as long = 10
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|