-
VB QUESTION
Hi,
I am VB beginner.I have a question like below statement.
"Const LB_FINDSTRING = &H18F"
What's the meaning of "&H18F"?
In VB programs there are many value like this kind of format.Could you
tell me what's the meaning of this kind of value?
-
Re: VB QUESTION
"William Zhang" <huanming_zhang@hotmail.com> wrote:
>
>Hi,
>I am VB beginner.I have a question like below statement.
>"Const LB_FINDSTRING = &H18F"
>What's the meaning of "&H18F"?
>In VB programs there are many value like this kind of format.Could you
>tell me what's the meaning of this kind of value?
>
>
The '&H' prefix allows you to code hexadecimal numbers directly.
-
Re: VB QUESTION
William,
This is a number expressed in hexidecimal. The &H denotes hex, while
&O denotes octyl. &H18F = 399 in this case. Each character after &H can
range from 0 to F (equivalent to 0 to 15). from right to left the value
is multiplied by 16^(position-1), so in your number 1 = 1 * 16^(3-1) or 256,
8 = 8 * 16^(2-1) or 128 and finally F = 15 * 16^(1-1) or 15. Summing these
values gives us 399. An easy way to convert is typing ? &H18F in the immediate
window, the result will be 399. Hope this helps.
Chris
"William Zhang" <huanming_zhang@hotmail.com> wrote:
>
>Hi,
>I am VB beginner.I have a question like below statement.
>"Const LB_FINDSTRING = &H18F"
>What's the meaning of "&H18F"?
>In VB programs there are many value like this kind of format.Could you
>tell me what's the meaning of this kind of value?
>
>
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks