MECHASQrL

joined 3 years ago
[–] MECHASQrL@lemmy.world 28 points 2 weeks ago (2 children)

I can't quite remember what I was debugging exactly, some constant was different in runtime compared to what was in code. Someone added a leading 0 to a const int to make the number align with others in terms of character count just to make it pretty I guess. That is when I learned about octal literals in C. I think that was the only time I've seen one in many years and it was used unintentionally. To save you a search leading 0 in C makes number to be base 8 same as 0x makes it hex aka base 16, so that inconspicuous 01000 is not a 1000 it's a 512.

[–] MECHASQrL@lemmy.world 2 points 4 months ago

One day I hope to come up with a topic worth a post. I have no idea how some of you, like The Picard Maneuver, manage to post daily.

[–] MECHASQrL@lemmy.world 13 points 5 months ago (5 children)

Same, this is my very first message in 3y on Lemmy.