catsub (2) --- add replacement text to end of string 05/29/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n subroutine catsub (lin, from, to, sub, new, k, maxnew) character lin (MAXLINE), new (maxnew), sub (MAXPAT) integer from(10), to(10), k, maxnew Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Catsub' adds replacement text onto a string after a pattern match and substitution operation. 'Lin' is the original text string matched by 'amatch'. 'From' and 'to' are ten- entry arrays specifying the beginning and end of all tagged subpatterns; the N'th element refers to the N-1th tagged pattern, and element 1 refers to the entire string matched. 'Sub' is the substitution pattern created by 'maksub'. 'New' is the string to receive the replacement text; its maximum length is 'maxnew' and the index at which the replacement text is to be inserted is 'k'. _I_m_p_l_e_m_e_n_t_a_t_i_o_n The substitution string is copied into 'new' starting at 'k'. Whenever a DITTO ("&" or "@") is encountered, a portion of the original text string is also copied. _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d new, k _C_a_l_l_s addset _S_e_e _A_l_s_o maksub (2), makpat (2), change (1), ed (1), se (1) catsub (2) - 1 - catsub (2)