DevX Home Today's Headlines   Articles Archive   Tip Bank   Forums

1. William Zhang Guest

## 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?

2. ralph Guest

## 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.

3. Chris Lucas Guest

## 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
•

 FAQ Latest Articles Java .NET XML Database Enterprise