Exceptions: Difference between revisions

Content added Content deleted
(Added Quackery.)
Line 2,593: Line 2,593:
if [ $ "It all went pear shaped in 'a'." message put bail ]</lang>
if [ $ "It all went pear shaped in 'a'." message put bail ]</lang>


The one piece of necessary information about changes to the system state that Quackery cannot infer, even in "typical" usage is the maximum number of items on the stack that may be removed or replaced during the execution of <code>a</code>. This needs to be specified by the programmer. (If the programmer is following conventions about stack comments, this could be gleaned from <code>a</code>'s stack comment, but Quackery steadfastly disregards all comments.) In this example, <code>a</code> consumes three stack items, so that is included in the code. How many it returns if there is no exception raised is not necessary information.
The one piece of necessary information about changes to the system state that Quackery cannot infer, even in "typical" usage, is the maximum number of items on the stack that may be removed or replaced during the execution of <code>a</code>. This needs to be specified by the programmer. (If the programmer is following conventions about stack comments, this could be gleaned from <code>a</code>'s stack comment, but Quackery steadfastly disregards all comments.) In this example, <code>a</code> consumes three stack items, so that is included in the code. How many it returns if there is no exception raised is not necessary information.


<lang Quackery> 3 backup a bailed if [ message take echo$ b ]</lang>
<lang Quackery> 3 backup a bailed if [ message take echo$ b ]</lang>