|
An interesting discussion, which comes up regularly.
"Quit" and "Exit" having an optional parameter are just one of those KiXtart oddities like the functions which don't return a value.
I guess they are there because of historical reasons, perhaps due to trying to follow batch file conventions.
Because KiXtart is a free format language, there is only one situation when it is acceptable (or at least reliable) for Quit or Exit to have no parameter, and that is when it is the last token in the file.
If you use Quit or Exit anywhere else in a file without a parameter you can expect to get bitten by it occasionally.
I disagree with formalising the use of parentheses after Quit or Exit. This would imply a function, which they clearly are not - they are commands.
A far simpler (and better IMO) option is simply to update the manual and make the parameter mandatory. While there will be cases when you are not interested in the exit status, I cannot think of any reason why you would want not to set an exit status.
It's current status as "it is sort of optional, sometimes, when it works" is not helpful to anyone. [ 27. May 2003, 10:28: Message edited by: Richard H. ]
|