Re:Statements vs. Expressions
by lmm on Thursday July 14, 2022 @06:38AM
(#32094207)
Not on their own. A full if, for or while (with the conditions and body) is usally a statement, and might be an expression in some languages.
[ Parent
| on HN ]
Re:Statements vs. Expressions
by FeepingCreature on Friday July 15, 2022 @06:17AM
(#32106580)
The body is also not terminated by a semicolon.
`while (true) { puts("Hello World\n"); };`
What you've written there does compile though, which was the original condition :).
Re:Statements vs. Expressions
by FeepingCreature on Saturday July 16, 2022 @05:06AM
(#32116349)
I get the joke, but it's two statements, not one. (while and ;)