Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ exit — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

for

select

while

next

10.0;exit, revision 1.0, 88/01/21
exit -- Exit from a loop.
usage: exit



DESCRIPTION
     exit terminates the flow of control in a shell loop construct (for,
     select, and while).  When exit is encountered, control passes to the
     first command following the body of the loop (see EXAMPLES below).

     You may also interrupt the flow of control in a loop without actually
     leaving the loop by using the next command.

     Do not confuse this command with the DM command ex, which exits the
     Display Manger and returns control to the boot shell. Type help ex or see
     the ex command description in the Domain Display Manager Commands
     Reference for more information.

     The exit command requires no arguments or options.


EXAMPLES
     Consider the following section from a shell script:


     while ((true))
     do    readc a
           if ((^a = "y")) then exit endif
           args "still looking ..."
     enddo
     args "Finished."

     When the readc (read_character) command reads a character into variable a
     that matches the character y, the exit command executes and causes the
     script to jump to the command following the enddo.

SEE ALSO
     More information is available.  Type

     help  for      For information on for loops

     help  select   For information on select loops

     help  while    For information on while loops

     help next      For information on next

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026