josef is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
josef @jk

its good u can do those so-called 'pointless blocks' in C because it lets you use ifdefs and if statements at the same time!!!!!! wowww!!!!

__windows__
if(optional_flag)
{
// thing you can optionally
// do but only in windows
}
else

{
// thing you can do anywhere
}

· Web · 3 · 7

also for code folding

@jk do {

} while(0);

let's you accept single lines without semicolon

@jk they're great !!

i also use them for critical sections and for malloc()-free()

vPortEnterCritical();
{
// unsafe hacks
}
vPortExitCritical();

@jk They are not pointless, they are scopes, and you can use them to declare variables inside of a code division, e.g.:

// do actions

{
int something;
something = op / 3;
something = something + something * 4;
do(something);
}

// do other things

@thomas i know this already why are you telling me this

@jk because you called them pointless and they're not è_é

@thomas i specifically put pointless in quotes and then pretended it with “so called” to indicate that it was other people, and not me, calling them pointless, because I knew someone would try to ‘correct me’ if I didn’t. and yet it still happened. what more could i have done

@jk yeah but i'm blind, you should have written it in braille