Re: API calls and &H1, &H2, &H4, &H8, ..., &H10, ..., H40000, ....

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ken Halter (Ken_Halter_at_Use_Sparingly_Hotmail.com)
Date: 09/17/04


Date: Fri, 17 Sep 2004 11:09:17 -0700

Joe wrote:
> Okay, I came into VB without *ever* learning about the hexadecimal notation.
> What do the following mean and what decimal numbers do they translate to?
>
> &H10 (is this equal to 16?)

Yup...

> &H400 (is this equal to 256?)

&h400's = 1024.

> If they are, why do I use these in API calls in lieu of 16 and 256?

There's really no reason. Hex is easier to read and mentally process if
you're going to end up breaking the value up into numerical "words".
Each letter represents a nibble of data (4 bits). 2 letters per byte (8
bits) and so on.

fwiw, If you fire up Windows Calculator and select the 'View/Scientific'
menu, you'll have a way to calculate hex/binary/etc.

-- 
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..


Relevant Pages

  • Re: API calls and &H1, &H2, &H4, &H8, ..., &H10, ..., H40000, ....
    ... Joe wrote: ... > What do the following mean and what decimal numbers do they translate to? ... fields in various control words and the actual "set" bits are more ... easily seen in hex than in decimal. ...
    (microsoft.public.vb.general.discussion)
  • Re: Joe again
    ... I know the sceptics on here,say it is impossible to forecast more than a few ... reason Joe actually gave when making his cold forecast. ...
    (uk.sci.weather)
  • Re: YOUNG AVENGERS #11: Heinbergs Twins Arent Wandas
    ... Kaplans and Shepherds to name their boys Billy and Tommy, no reason ... think that Wanda can transfigure souls, no reason to think that the ... Those aren't her powers. ... the mystic energies as well as her hex powers ...
    (rec.arts.comics.marvel.universe)
  • Re: Build and Sysgen question
    ... Part of the reason for the decree of "never do it" is because on SOME ... PUBLIC code, be my guest. ... Joe Welfeld wrote: ... I also get the source code that would allow me to create that same ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Hamiltons rule
    ... >> Joe Felsenstein wrote: ... > of the allele that are there for some other reason ... "The reason it (the assumptions that R = genes IBD) ...
    (sci.bio.evolution)