Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ while — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ABTSEV

EXIT

8.0;while, revision 8.0, 84/03/20
WHILE -- Execute a WHILE loop.
usage:  WHILE condition DO command ... ENDDO


FORMAT

  WHILE condition DO command ... ENDDO


  WHILE  executes  a  command  (or commands) as long as the results of a Boolean
  test are true.  You can extend the WHILE command over several lines if you use
  it  interactively or in a Shell script.  When you use WHILE interactively, and
  extend the command over more than one line, the Shell prompts you for each new
  line of the command with the $_ prompt.


ARGUMENTS

  condition
  (required)         Specify a command or program to execute and test for truth,
                     or specify a variable expression  or  Boolean  variable  to
                     test  for  truth.    "Truth" usually means that the command
                     executes successfully (without any errors), or that a Shell
                     variable  expression  or  Boolean is "true". (Specifically,
                     this argument is evaluated TRUE  if  it  returns  an  abort
                     severity level of 0 (zero).)

                     Refer   to   the   DOMAIN  System  User's  Guide  for  more
                     information on Shell variables.

  command ...
  (required)          Specify  the  command(s)  or  program(s)  to  execute   if
                     'condition' returns TRUE.


EXAMPLES


   1. $ eon
      $ K := 3                                          (set var K = 3  )
      $ WHILE ((^K > 0))
      $_ DO args ((^k)); k := ^k - 1                    (body of WHILE  )
      $_ ENDDO
      3                                                 (output of WHILE)
      2                                                        .
      1                                                        .
      $





RELATED TOPICS

  More information is available.  Type:

  - HELP ABTSEV
   for more information on abort severity levels.

  - HELP EXIT
   for details about exiting from a WHILE loop.

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