A lot of people don’t know this one weird trick — much like JavaScript, C also lets you perform arithmetic with mixed types:
A lot of people don’t know this one weird trick — much like JavaScript, C also lets you perform arithmetic with mixed types: 91 comments
@luna you know, sometimes I'm really in awe at how adept people can become at cursed C. @luna@pony.social wait,, what would (also on my blog: https://moonbase.lgbt/blog/c-mixed-type-arithmetic/ — I’m posting things there more often these days <3) @scarcraft it's Comic Code by Toshi Omagari: https://fonts.ilovetypography.com/fonts/tabular-type-foundry/comic-code @fay59 oh this is just the font I use for my shell anyways, I didn't choose it for the shitpost @luna totally unrelated, sorry, but I’ve gotta ask — what font’re you using? :anja_adormiras: @luna brb trying to explain to the villagers why they need to bring flaming torches and pitchforks (brilliant work, so underhanded it does exactly what you expect it to) @luna Staring at this very confused until I realised I was thinking in hex and not decimal @markus yes, it's Comic Code by Toshi Omagari: https://fonts.ilovetypography.com/fonts/tabular-type-foundry/comic-code @luna@pony.social I'm going to apply that trick to my next self driving car. Would you like to come for a ride? :blobcatgiggle2: |
You can do this for exponents, too!