50 ms·
What's interesting to me is that there is also a contingent of people that represent hexadecimal numbers with an "h" suffix, like FACEDEEDh. I always wondered
by jrockway 5y ago
What's interesting to me is that there is also a contingent of people that represent hexadecimal numbers with an "h" suffix, like FACEDEEDh. I always wondered what pushed people one way or the other. I learned 0x first but see "h" most in assembly code listings (which was indeed not my first programming language) and hardware datasheets.
- IncRnd 5y agoThat's definitely true. I think it comes from the preference of the author of an assembler's parser regarding how to recognize a number's base - either by analyzing the string or by forcing the progammer to declare upfront.
- bspammer 5y agoThe prefix seems better to me because you read it first, and also the x is a more clear marker than h because it’s at the opposite end of the alphabet to the rest of the hexadecimal digits.
- 1597 5y ago"h" suffix is a pain in the ass in MASM and probably other assemblers (a leading 0 is required for hex literals that begin with a letter to distinguish from identifiers e.g. mov eax, 0FACEDEEDh)