

            gklarg (2) --- parse a single key-letter argument        03/23/80


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function gklarg (args, str)
                 integer args (26)
                 character str (ARB)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Gklarg'  is  used  to  parse  a key-letter argument string.
                 Such an argument consists of a dash ("-")  followed  by  any
                 number of letters (in upper or lower case).

                 All  elements  in  the array 'args' must be preset to one of
                 two values before calling 'gklarg'.  Elements  corresponding
                 to  allowable  option letters should be initialized to zero;
                 all others should contain -1.

                 'Gklarg' sets the elements of 'args' that correspond to  any
                 option  letters found in 'str' to the value 1.  The function
                 return is ERR if 'str' does not begin with a dash, or if any
                 disallowed option letters are encountered, OK otherwise.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Gklarg' first verifies  that  the  string  given  in  'str'
                 begins  with  a dash.  If it does not, ERR is returned.  The
                 remainder of the string is examined  character-by-character.
                 If a letter is encountered, and the corresponding element of
                 'args'  is  nonnegative,  then  the  element  is set to one.
                 Otherwise the value ERR is returned immediately.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 args


            _C_a_l_l_s

                 mapdn


            _S_e_e _A_l_s_o

                 gfnarg (2), chkarg (2), getkwd (2)









            gklarg (2)                    - 1 -                    gklarg (2)


