Topic List | Page List: 1 |
---|---|
Topic | Ugh dealing with "strings" in C is such a pain. |
DevsBro 10/25/18 8:40:58 AM #14: | 1337toothbrush posted... It can be tedious, but I like the flexibility. C has fantastic conditional compilation features, is the main reason I have these few C source files. The majority of my code for this is in Ada, which people like to crap on but once you get used to it, it's a great language for, well, preventing stuff like this topic. Like straight up if you define a type Single_Digit is range 0..9 It won't let you assign 10 to it, which is pretty standard, but the nice thing is it also won't let you do this: declare Unless you either explicitly cast to an Integer or change the Single_Digit definition from a type to an Integer subtype. It's great because it always makes sure you are sure you want to do what you're asking it to do and didn't just brainfart something. --- 53 LIII 0b110101 p16 0x35 ... Copied to Clipboard! |
Topic List | Page List: 1 |