Valhalla Legends Archive

Programming => General Programming => Java Programming => Topic started by: touchstone on March 12, 2004, 12:04 PM

Title: question on hexadecimal notation
Post by: touchstone on March 12, 2004, 12:04 PM
hi, i have found this

"  7 can be represented any one of the form 0X7, 0x7, 0x07, 0X07  "  

i simply want to know does X and x have any difference ? what is that ?

i have never seen to use X.

now say, if i write  0X 1234 and 0x 1234 . are these  two number different?

Title: Re:question on hexadecimal notation
Post by: iago on March 12, 2004, 12:37 PM
In any (real) language, 0x is used to indicate hex.

0x123 and 0X123 are the same.

I'm not sure if you can put a space before or after the x, though.

I've never seen anybody use 0X123, though, so you should stick with small x for looks.
Title: Re:question on hexadecimal notation
Post by: touchstone on March 12, 2004, 12:46 PM

I'm not sure if you can put a space before or after the x


you are right . i wrote that way bcoz trailing numbers are important. in fact spaces are not there.


0x123 and 0X123 are the same


-thanks for the information