Support #915
When is a semicolon needed to end a statement/command?
Description
Some commands do not need a semicolon to make them happen.
if 1 > 0 then println "bigger" endif
The line above will execute even though there is no semicolon! Is this a bug or a feature?
I can understand that the ending semicolon is necessary in commands whose last part is an expression.
It is not clear to me why a semicolon is needed after ciao
, continue
and break
(and maybe some others too).
History
#1 Updated by John Abbott almost 8 years ago
This question came to me as I was writing the tutorials for CoCoA-5. I actually thought that the final semicolon was obligatory except for manual searches. I did know that the semicolon could be skipped inside some compound statements (e.g. if...then...endif
).
#2 Updated by John Abbott 4 months ago
- Priority changed from Normal to Low
It'd be nice if there were a clean answer to this question, but it is also quite unimportant.
I don't recall ever having had a problem related to this.
Shall we just close or reject?