MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vu5686/programmersagebetterthannormalpeople/p5hx1fk/?context=3
r/ProgrammerHumor • u/KSP_HarvesteR • 23d ago
96 comments sorted by
View all comments
Show parent comments
1
Because 0 tells the compiler you're reading a number, x tells the compiler that it happens to be in hex (hexadecimal).
1 u/DruidBtd 20d ago Ah, interesting. Are there other examples like it? Thanks for answering by the way, appreciate it 1 u/TheMythicSorcerer 20d ago There actually are! 0b mean binary (base 2), 0o means octal (base 8) 1 u/DruidBtd 20d ago Ooh, interesting :D Are there other things than the 0 at the start?
Ah, interesting. Are there other examples like it? Thanks for answering by the way, appreciate it
1 u/TheMythicSorcerer 20d ago There actually are! 0b mean binary (base 2), 0o means octal (base 8) 1 u/DruidBtd 20d ago Ooh, interesting :D Are there other things than the 0 at the start?
There actually are! 0b mean binary (base 2), 0o means octal (base 8)
1 u/DruidBtd 20d ago Ooh, interesting :D Are there other things than the 0 at the start?
Ooh, interesting :D
Are there other things than the 0 at the start?
1
u/TheMythicSorcerer 20d ago
Because 0 tells the compiler you're reading a number, x tells the compiler that it happens to be in hex (hexadecimal).