Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

READ

READLN

9.0;readc, revision 9.0, 85/03/26
READC -- Set variables equal to input characters.
usage:  READC [-P[ROMPT] prompt] [-ERR[IN]] variable_list


FORMAT

  READC [options] 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 <prompt>" argument  to  instruct  READC  to
  issue a prompt.

  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[ROMPT] prompt
                     Specify  a  particular  prompt  string to request the input
                     values.  Enclose the string in single quotes if it contains
                     literal blanks.

  -ERR[IN]            Read  input  from  error  input instead of standard input.
                     This option is useful  for  reading  user  input  from  the
                     Shell's  input pad (where error input is normally directed)
                     when the READC command appears  inside  a  pipeline,  since
                     standard input in that case is connected to the pipe.


EXAMPLES

  Consider the following sequence of commands and input:

      $ readc -p "Do you want to continue? (y/n): " ans
      Do you want to continue? (y/n): y
      $ lvar
      string ans = y

  In  this example, READC displays the prompt "Do you want to continue? (y/n): "
  in the process input  window,  and  assigns  the  value  of  the  first  input
  character ("y" in this case) to the variable named "ans".

  For  more  information  on  Shell variables, refer to the DOMAIN System User's
  Guide.


RELATED TOPICS

  More information is available.  Type:

  - HELP READ
   for information on assigning multi-character strings to variables.

  - HELP READLN
   for information on assigning whole-line strings to variables.

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