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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

index an array using a hexadecimal 1

Status
Not open for further replies.

SotonStu

Programmer
May 7, 2003
33
GB
Hi, I need to set up an array where the indices are hexadecimal numbers. Is there any way i can do this without converting the hexadecimal numbers into decimal first?

thanks for any help
 
A hexadecimal number is just as good as a decimal number. When your program is compiled, it's exactly the same as a decimal numer : It's converted to some binary stuff.

Hexadecimal is only a notation used to please the human eye / brain (Much easyer to read than binary (Like 1001001)).

MyArray[0x0f] is the same as MyArray[15]
Use whatever you prefer.

/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top