Should have put this in the beginners section. Am I the only one on the planet who just now discovered that, given:is NOT the same as:In the first snippet, only "do this" is bound by the "else" clause. "doThat" will execute no matter what, the same as if one placed that it on its very own line below the entirety of the if/then construct.
The semiColon seems to be a convenience for looking at lines of code, but it actually is two very independent lines. If such a line follows "else", it will not be part of that "else".
Craig
CODE:
if this then XYZelse doThis ; doThat
CODE:
if this then XYZelse doThis doThatend if
The semiColon seems to be a convenience for looking at lines of code, but it actually is two very independent lines. If such a line follows "else", it will not be part of that "else".
Craig
Statistics: Posted by dunbarx — Fri May 31, 2024 4:02 pm