<?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%2Fpopall</id>
		<title>IB Statements/popall - 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%2Fpopall"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/popall&amp;action=history"/>
		<updated>2026-05-04T20:37:52Z</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/popall&amp;diff=384&amp;oldid=prev</id>
		<title>Badge: New page: '''POPALL statement'''   '''Syntax:'''  POPALL    '''Discussion:'''  The POPALL statement clears all return addresses from the GOSUB stack. It is used to branch directly from a nested subr...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/popall&amp;diff=384&amp;oldid=prev"/>
				<updated>2009-05-21T11:09:25Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;POPALL statement&amp;#39;&amp;#39;&amp;#39;   &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;  POPALL    &amp;#39;&amp;#39;&amp;#39;Discussion:&amp;#39;&amp;#39;&amp;#39;  The POPALL statement clears all return addresses from the GOSUB stack. It is used to branch directly from a nested subr...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''POPALL statement'''&lt;br /&gt;
 &lt;br /&gt;
'''Syntax:'''  POPALL  &lt;br /&gt;
&lt;br /&gt;
'''Discussion:'''  The POPALL statement clears all return addresses from the GOSUB stack. It is used to branch directly from a nested subroutine (at any level) to the main program. &lt;br /&gt;
&lt;br /&gt;
Note: If the subroutine stack is empty, the POPALL statement has no effect (i.e., it does not result in an exception branch). &lt;br /&gt;
&lt;br /&gt;
See POP. &lt;br /&gt;
 &lt;br /&gt;
'''Example:'''&lt;br /&gt;
  GOSUB 1000&lt;br /&gt;
 .&lt;br /&gt;
 500     PRINT (0) &amp;quot;CUSTOMER OVER CREDIT LIMIT.&amp;quot;&lt;br /&gt;
 .&lt;br /&gt;
 1000    OPEN (1) &amp;quot;C1A&amp;quot;,EXCP=9000&lt;br /&gt;
        READ (1,1000) EXCP=8000&lt;br /&gt;
        IF ARTOTAL &amp;gt; 0 THEN  2000&lt;br /&gt;
        .&lt;br /&gt;
        RETURN&lt;br /&gt;
  !&lt;br /&gt;
 2000    FLAG1$ = &amp;quot;Y&amp;quot;&lt;br /&gt;
        IF ARTOTAL &amp;gt; CRLIMIT THEN POPALL AND GOTO 500&lt;br /&gt;
        .&lt;br /&gt;
        RETURN&lt;br /&gt;
&lt;br /&gt;
In this example, the main section of the program directs control to subroutine label 1000. Within that subroutine, if a certain condition is met (namely if ARTOTAL is greater than 0), program control is directed to a nested subroutine at label 2000. &lt;br /&gt;
&lt;br /&gt;
Within the nested subroutine, if a certain condition is met (in this case, ARTOTAL greater than CRLIMIT), all return addresses are popped from the subroutine stack and program control is transferred directly to statement 500 in the main section.&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>