<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=SCI_Programming_Language%2FControl_Flow</id>
	<title>SCI Programming Language/Control Flow - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=SCI_Programming_Language%2FControl_Flow"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;action=history"/>
	<updated>2026-10-27T10:32:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71194&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71194&amp;oldid=prev"/>
		<updated>2025-02-16T21:00:48Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:00, 16 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71193&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71193&amp;oldid=prev"/>
		<updated>2024-06-03T05:14:21Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:14, 3 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71192&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=SCI_Programming_Language/Control_Flow&amp;diff=71192&amp;oldid=prev"/>
		<updated>2018-03-02T23:12:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Official SCI Documentation]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
Chapter: &lt;br /&gt;
[[SCI Programming Language/Introduction|1]] | &lt;br /&gt;
[[SCI Programming Language/Primitive Procedures|2]] | &lt;br /&gt;
[[SCI Programming Language/Primitive_Procedures#Arithmetic_Primitives|3]] | &lt;br /&gt;
[[SCI Programming Language/Primitive_Procedures#Boolean_Primitives|4]] | &lt;br /&gt;
[[SCI Programming Language/Primitive_Procedures#Assignment_Primitives |5]] | &lt;br /&gt;
[[SCI Programming Language/Data Types and Variables|6]] | &lt;br /&gt;
[[SCI Programming Language/Definitions|7]] | &lt;br /&gt;
[[SCI Programming Language/Control Flow|8]] | &lt;br /&gt;
[[SCI Programming Language/Control Flow#Conditionals|9]] | &lt;br /&gt;
[[SCI Programming Language/Control Flow#Iteration|10]] | &lt;br /&gt;
[[SCI Programming Language/Procedures|11]] | &lt;br /&gt;
[[SCI Programming Language/Files|12]] | &lt;br /&gt;
[[SCI Programming Language/Compiling SCI|13]] | &lt;br /&gt;
[[SCI Programming Language/Index|Index]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size: 22pt&amp;quot;&amp;gt;Control Flow&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Author: [[Jeff Stephenson]]&amp;#039;&amp;#039;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; Control Flow ==&lt;br /&gt;
&lt;br /&gt;
The value of a control flow expression is the value of the last expression in the control body which was evaluated. Thus, if we execute the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(= x 3)&lt;br /&gt;
(= Y 2)&lt;br /&gt;
(= Y&lt;br /&gt;
   (if (&amp;gt; x y)&lt;br /&gt;
       (-x y)&lt;br /&gt;
   else&lt;br /&gt;
       (+ x y)&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y will have the value 1.&lt;br /&gt;
&lt;br /&gt;
In the following, code1, code2, ... codeN are sequences of expressions. Brackets [...] indicate optional entries. The term &amp;quot;not FALSE&amp;quot; is used to indicate a non-zero result.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; Conditionals ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
===&amp;lt;br /&amp;gt; if ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(if expression code1 [else code2])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If expression is not FALSE, execute code1, else execute code2.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Set the value 0&amp;#039;x to the larger of a or b.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(if (&amp;gt; a b)	;expression&lt;br /&gt;
   ( = x a)	;code1&lt;br /&gt;
else&lt;br /&gt;
   (= x b)	;code2&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; cond ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(cond (expl codel) (exp2 code2) ... [(else codeN)])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluate e1. If it is not FALSE, execute code1 and exit the cond clause. If it is FALSE, evaluate e2 and continue. If all of the expressions are FALSE and the optional else clause is present, execute codeN.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Set x to the larger of a or b and to 0 if a = b.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(cond&lt;br /&gt;
   ((== a b)	;expression1&lt;br /&gt;
      (= x 0)	;code1&lt;br /&gt;
   )&lt;br /&gt;
   ((&amp;gt; a b)	;expression2&lt;br /&gt;
      (= x a)	;code2&lt;br /&gt;
   )&lt;br /&gt;
   (else&lt;br /&gt;
      (= x b)	;codeN&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; switch ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(switch expression (exp1 code1) (exp2 code2) ... [(else codeN) 1 )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluate expression. If it is equal to exp1, execute code1 and exit the switch. If it is equal to exp2, execute code2 and exit. If it doesn&amp;#039;t equal any of the expressions and the optional else clause is present, execute codeN.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Evaluates a -b.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(switch (-a b)						;expression&lt;br /&gt;
   (0							;expression1&lt;br /&gt;
      (Prints &amp;quot;They are equal&amp;quot;)				;code1&lt;br /&gt;
   )&lt;br /&gt;
   (-1							;expression2&lt;br /&gt;
      (Prints &amp;quot;B is one unit larger than A&amp;quot;)		;code2&lt;br /&gt;
   )&lt;br /&gt;
   ( 1							;expression3&lt;br /&gt;
      (Prints &amp;quot;A is one unit larger than B&amp;quot;)		;code3&lt;br /&gt;
   )&lt;br /&gt;
   (else&lt;br /&gt;
      (Prints &amp;quot;A and B differ by more than one&amp;quot;)	;codeN&lt;br /&gt;
   )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; switchto ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(switchto e xpression (code1) (code2) ... [(else codeN)])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluate expression. If it is equal to 0, execute code1. If it is equal to 1, execute code2, and so on. switchto is a shorthand form of the switch statement where the test values are consecutive integers beginning with 0. It is commonly used in the changeState method of an SCI script object (where the expression is the state of the script).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Evaluates the variable stateNum.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(switchto stateNum					;expression&lt;br /&gt;
   (&lt;br /&gt;
      (Prints &amp;quot;This is state O&amp;quot;)			;code1&lt;br /&gt;
   )&lt;br /&gt;
   (&lt;br /&gt;
      (Prints &amp;quot;This is state 1&amp;quot;)			;code2&lt;br /&gt;
   )&lt;br /&gt;
   (else&lt;br /&gt;
      (Prints &amp;quot;The variable stateNum is not 0 or 1&amp;quot;)	;codeN&lt;br /&gt;
   )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; Iteration ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
===&amp;lt;br /&amp;gt; for ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
(for (initialization) condition (re-initialization) code)&lt;br /&gt;
&lt;br /&gt;
Evaluate the expressions comprising initialization. Then evaluate condition. If the result is FALSE, exit the loop. Otherwise, execute code, then the expressions comprising re-initialization, and loop back to condition.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Set x = a + b while i &amp;lt; n. Note that this value does not change.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(for&lt;br /&gt;
   ((= a 0)(= b 1)(= i 3))	;initialization&lt;br /&gt;
   (&amp;lt; i n)			;condition&lt;br /&gt;
   ((++ i))			;re-initialization&lt;br /&gt;
   (= x (+ a b))		;code&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the initialization statements may include more than one expression and therefore require a set of surrounding parentheses.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; while ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(while condition code)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluate condition. If not FALSE, execute code and loop back to evaluate condition again. Exit the loop when condition is FALSE. (Note that this means that the resultant value of a while condition is always FALSE.) This is equivalent to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;(for (0) condition (0) code)&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Set x = x + the incremented value of i while i &amp;lt; n.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
(while&lt;br /&gt;
   (&amp;lt; i n)		;condition&lt;br /&gt;
      (+= x (++ i))	;code&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; repeat ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(repeat code)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continually execute the code until some condition in the code (a break) causes the loop to be exited. This is equivalent to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;(while TRUE code) or (for (0) TRUE (0) code)&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Set x =x + 2. Note that this will loop forever.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(repeat&lt;br /&gt;
   (+= x 2)	;code&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; Supporting constructs tor iteration ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
===&amp;lt;br /&amp;gt; break ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(break [n])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Break out of n levels of loops. If n is not specified break out of the innermost loop.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Repeat incrementing i until i &amp;gt; n.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(repeat&lt;br /&gt;
   (++ i)&lt;br /&gt;
   (if (&amp;gt; i n) (break))&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; breakif ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(breakif expression [n])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If expression is not FALSE, break out of n levels of loops. If n is not specified, break out of the innermost loop.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Repeat incrementing i until i &amp;gt; n.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(repeat&lt;br /&gt;
   (++ i)&lt;br /&gt;
   (breakif (&amp;gt; i n))&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; continue ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(continue [n])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Loop back to the beginning of the nth level loop. If n is not specified, loop to the beginning of the innermost loop.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: ||Set x =y / i unless i =O.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
(for ((i = -5)) &amp;lt;&amp;lt; i 5) ((++ i))&lt;br /&gt;
      (if (== i 0) (continue))&lt;br /&gt;
      (=x (/ y i))&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;br /&amp;gt; contif ===&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(contif expression [n])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If expression is not FALSE, loop back to the beginning of the nth level loop. If n is not specified, loop to the beginning of the innermost loop.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example: &amp;amp;nbsp;Same as &amp;quot;continue&amp;quot; except using the logical NOT to test i.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(for ((= i -5)) &amp;lt;&amp;lt; i 5) ((++ i))&lt;br /&gt;
      (contif (not i))&lt;br /&gt;
      (=x(/yi))&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; return ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;(return [expression))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return statement returns control to the procedure which called the currently executing procedure. If the optional expression is present, that value is returned as the value of the current procedure. There is an implicit return at the end of all procedures, and the value returned in that case is the value of the last expression evaluated. A return from the main procedure of script 0 returns to the operating system.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;example:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot;&amp;gt;&lt;br /&gt;
(return&lt;br /&gt;
   (+ x k )		;optional expression&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[SCI Programming Language | Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;float: left&amp;quot;&amp;gt;[[SCI Programming Language/Definitions|&amp;amp;lt; Previous: Definitions]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;float: right&amp;quot;&amp;gt;[[SCI Programming Language/Procedures|Next: Procedures &amp;amp;gt;]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:SCI Documentation]]&lt;br /&gt;
[[Category:SCI32]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
</feed>