Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
loeg
7y ago
0 comments
Share
In particular, a single statement. I'm sure the link covers it, but:
if (foo) MULTI_LINE_MACRO;
Breaks without some wrapper like if (1) { A; B; } or do { A; B; } while (0):
if (foo) A; B; // oops, unconditional (e.g., "goto fail")
undefined | Better HN
0 comments
default
newest
oldest
monocasa
7y ago
It also gives you a nice scope to keep local variables in, but there are other ways to accomplish that too.
loeg
OP
7y ago
Yeah, that's a good point too.
j
/
k
navigate · click thread line to collapse