Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readc — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

8.0;readc, revision 8.0, 84/03/20
READC -- Set variables equal to input characters.
usage:  READC [-P prompt] variable_list


FORMAT

  READC [-P prompt] variable_list


  The  READC  command  reads  single  characters  as  input,  and sets a list of
  variables equal to those character values.  READC parses each  character  from
  the  input line as a separate token, and each variable in the list is assigned
  the value of a token.  Use the "-P <promt>"  argument  to  instruct  READC  to
  issue a prompt other than the $.

  The READC command considers all input to be type "string".


ARGUMENTS

  variable_list
  (required)          Specify  the names of the variables that receive the input
                     values.


OPTIONS

  -P <prompt>        Specify a particular prompt string  to  request  the  input
                     values.


EXAMPLES

  Consider the following sequence of commands and input:

      $ READC -P "enter color and fabric codes:" cvar fvar
      enter color and fabric codes: R 2
      $
      $ LVAR
      string cvar = r
      string fvar = 1
      $


  In this example, READC displays the prompt "enter color and fabric codes:"  in
  the  process  input  window,  and  assigns  the  values of the first two input
  characters ("R" and "1") to the variables named "cvar"  and  "fvar",  in  that
  order.    The  output  of the LVAR command shows that even though we input the
  integer "2" for "fvar", READC interpreted the value as a string.

  For more information on Shell variables, refer to  Chapter  3  of  the  DOMAIN
  System Command Reference Manual.

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