

            declare (1) --- create shell variables                   09/11/84


          | _U_s_a_g_e

                 declare { <identifier> [ = <value> ] }


            _D_e_s_c_r_i_p_t_i_o_n

                 'Declare'  is the primary method of creating shell variables
                 with local (i.e., to the command file) scope.  Its arguments
                 are the names of the variables  to  be  declared;  they  are
                 declared  at  the  current  lexical  level  and assigned the
                 specified values.   If  a  value  is  not  specified  for  a
          |      variable,  it  is  given the empty string as a value.  Value
          |      may contain unprintable characters  in  a  mnemonic  format.
          |      The  format  is  '<'  ascii_mnemonic '>'.  To set dummy to a
          |      dash followed by a control-g and then another dash one would
          |      say:

          |           declare dummy = "-<bel>-".

          |      The quotes are needed to prevent the shell from interpreting
          |      the  '<'  and  '>'  signs  as  I/O  redirectors.   Variables
                 declared within a command file exist as long as that command
                 file  is active; when its execution is complete, they disap-
                 pear.  If a variable of the same name is already declared at
                 that level, its value is not changed.

                 Variables may also be created by the 'set' command.


            _E_x_a_m_p_l_e_s

                 declare name address telephone_number
                 declare terminal_type
          |      declare i = 1 bel = "<bel>"
          |      declare nobel = "@<bel>"


            _B_u_g_s

                 Does not complain about multiple declarations of a  variable
                 within a given scope.


            _S_e_e _A_l_s_o

                 forget  (1),  set  (1), vars (1), save (1), _U_s_e_r_'_s _G_u_i_d_e _f_o_r
                 _t_h_e _S_o_f_t_w_a_r_e _T_o_o_l_s _S_u_b_s_y_s_t_e_m _C_o_m_m_a_n_d _I_n_t_e_r_p_r_e_t_e_r










            declare (1)                   - 1 -                   declare (1)


