Valhalla Legends Forums Archive | Java Programming | question on hexadecimal notation

AuthorMessageTime
touchstone
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?

March 12, 2004, 6:04 PM
iago
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.
March 12, 2004, 6:37 PM
touchstone
[code]
I'm not sure if you can put a space before or after the x
[/code]

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

[code]
0x123 and 0X123 are the same
[/code]

-thanks for the information

March 12, 2004, 6:46 PM

Search