Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert hexadecimal to integer 2

Status
Not open for further replies.

Brezhnev

Programmer
Sep 25, 2002
53
CA
Hi all!
Sorry for stupid question but just got no time to find the answer in books....
Very simple -- I need to convert hexadecimal to integer ...
And if anyone can refer me to some reading about converting numbers from system to system -- would appreciate very much

Thanx
 
HI

The variables can be input as integers or in its place a hex code..

For example..

myInteger = 0x000000FF

? myInteger && Displays 255

SO converting Hex to Integer is that simple.

Now Integer to HEX.. can be done using the following code..
cHex = TRANSFORM(255,"@0")
? cHex && DISPLAYS 0x000000FF

The difference is.. that

? TYPE("cHex") && DISPLAYS C to indicate Character type
? TYPE("myInteger") && Displays N .. i.e. Numeric

Hope this helps you :)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top