Open Notxsomeone opened 9 months ago
As of my understanding you are never breaking out or the loop. Are You?
As of my understanding you are never breaking out or the loop. Are You?
while(0)
technique is used everywhere and it only runs once. I don't know what are you talking about.
My apologies I overlooked while(0)
.
But is using a single interactional loop advantageous by any change.Just a question from my side
My apologies I overlooked
while(0)
. But is using a single interactional loop advantageous by any change.Just a question from my side
It makes the entire macro act like a statement, meaning you have to put a semicolon at the end plus it has its own scope so no conflicts if you call it multiple times.
If I really wanted to be pedantic it would have been nice to surround argv
with parentheses so expressions get evaluated, but that's a very unusual use case for argv
(you are supposed to just pass it as it is) so whatever. Classic C macros and its shenanigans.
Although executable on windows end with
.exe
they can be called without them. This makesargv[0]
different from the actual name of the program (nob.exe) and causesMoveFileEx
to fail.