<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.signature.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Fongoto</id>
		<title>IB Statements/ongoto - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Fongoto"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/ongoto&amp;action=history"/>
		<updated>2026-04-06T23:20:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/ongoto&amp;diff=358&amp;oldid=prev</id>
		<title>Badge: New page: '''ON/GOTO statement''' ''' ''' '''Syntax:'''  ON numeric-argument GOTO statement-list    '''Discussion:'''  The ON/GOTO statement transfers program control to a specific statement-label b...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/ongoto&amp;diff=358&amp;oldid=prev"/>
				<updated>2009-05-20T11:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;ON/GOTO statement&amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;  ON numeric-argument GOTO statement-list    &amp;#39;&amp;#39;&amp;#39;Discussion:&amp;#39;&amp;#39;&amp;#39;  The ON/GOTO statement transfers program control to a specific statement-label b...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''ON/GOTO statement''' '''&lt;br /&gt;
'''&lt;br /&gt;
'''Syntax:'''  ON numeric-argument GOTO statement-list  &lt;br /&gt;
&lt;br /&gt;
'''Discussion:'''  The ON/GOTO statement transfers program control to a specific statement-label based on the integer portion of the numeric-argument. &lt;br /&gt;
&lt;br /&gt;
The numeric-argument may be a single element numeric variable, a numeric array element, a numeric expression, or a numeric function. &lt;br /&gt;
&lt;br /&gt;
The statement-list contains a minimum of three statement-labels, separated by commas. The integer portion of the numeric-argument determines which statement-label to use, based on a simple set of rules. &lt;br /&gt;
&lt;br /&gt;
If there are only three statement-labels, the rules are: &lt;br /&gt;
&lt;br /&gt;
  Value of numeric-argument   Branch to statement-label&lt;br /&gt;
  ===========================================================&lt;br /&gt;
  negative                    first statement-label&lt;br /&gt;
  zero                        second statement-label&lt;br /&gt;
  positive                    third statement-label&lt;br /&gt;
&lt;br /&gt;
If there are more than three labels, they represent positive integer values of the numeric-argument, as follows: &lt;br /&gt;
&lt;br /&gt;
  Value of numeric-argument   Branch to statement-label&lt;br /&gt;
  ===========================================================&lt;br /&gt;
  negative                    first statement-label&lt;br /&gt;
  zero                        second statement-label&lt;br /&gt;
  1                           third statement-label&lt;br /&gt;
  2                           fourth statement-label&lt;br /&gt;
  3                           fifth statement-label&lt;br /&gt;
  etc.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the value of the numeric-argument plus 2 is greater than the number of branch labels in the statement-list, program control is transferred to the last branch label in the list. &lt;br /&gt;
For example, if the statement-list includes six statement-labels, the sixth label represents the branch-to point for numeric-argument values of 4 and greater. &lt;br /&gt;
&lt;br /&gt;
See GOTO. &lt;br /&gt;
 &lt;br /&gt;
'''Example 1:'''  ON X GOTO 100,200,300,400,500&lt;br /&gt;
&lt;br /&gt;
In the above example, the integer value of the numeric variable X is used to determine where program control will be transferred. &lt;br /&gt;
&lt;br /&gt;
For example, if X is less than zero, program control will be transferred to statement label 100. Likewise, if X equals 0, control will be transferred to statement label 200. &lt;br /&gt;
&lt;br /&gt;
If X equals 1, control will be transferred to statement label 300, and if X equals 2, control will be transferred to statement label 400. &lt;br /&gt;
&lt;br /&gt;
If X is greater than or equal to 3, program control will be transferred to the last statement-label on the list, in this case statement 500. &lt;br /&gt;
 &lt;br /&gt;
'''Example 2:'''  ON CRLIMIT - ARTOTAL GOTO 100,100,200&lt;br /&gt;
&lt;br /&gt;
In this example, the numeric-argument is the expression: &lt;br /&gt;
&lt;br /&gt;
  CRLIMIT - ARTOTAL&lt;br /&gt;
&lt;br /&gt;
The integer portion of this expression is used to determine where program control will be transferred. &lt;br /&gt;
For example, if the expression yields a negative or zero value (indicating that ARTOTAL is greater or equal to zero), control will be transferred to statement-label 100. &lt;br /&gt;
&lt;br /&gt;
If the expression yields a value of 1 or more, program control will be transferred to statement-label 200.&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>