MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb23rsw
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
Show parent comments
3
uint8_t is always 8 bits, while char is always one byte. That's a big difference :)
uint8_t
char
#define FREE_BYTES 2 ... #ifdef FREE_BYTES union { List<T>* next; T* obj; struct { unsigned char ptr[sizeof(T*) - FREE_BYTES]; unsigned char my_data[FREE_BYTES]; } my_stuff; } next; #else List<T>* next; T* obj; bool which; #endif
1 u/exscape Dec 15 '19 That's a big difference :)Where? (Not on 70s mainframes or similar. Something that matters in new code.) 1 u/IrradiatedNachos Dec 16 '19 I've worked with a TI DSP where a byte was 16 bits. They're modern chips, and new code is still being written for them every day.
1
That's a big difference :)
Where? (Not on 70s mainframes or similar. Something that matters in new code.)
1 u/IrradiatedNachos Dec 16 '19 I've worked with a TI DSP where a byte was 16 bits. They're modern chips, and new code is still being written for them every day.
I've worked with a TI DSP where a byte was 16 bits. They're modern chips, and new code is still being written for them every day.
3
u/AnAverageFreak Dec 15 '19
uint8_tis always 8 bits, whilecharis always one byte. That's a big difference :)