NAME ctov - convert EOS-terminated string to PL/I varying string SYNOPSIS integer function ctov (str, i, var, len) character str (ARB) integer i, len packed_char var (len) DESCRIPTION 'Ctov' converts Software Tools style EOS-terminated strings to PL/I style "character varying" strings. Character varying strings consist of a one-word length field, followed by up to 65535 words of packed character data. The argument 'str' contains the EOS-terminated string to be converted. The integer 'i' gives the position of the first character in the string to be converted, i.e. the starting point of the substring to be packed. 'Var' is the array which is to receive the character varying string, and 'len' is the number of words in 'var' available for holding characters plus one (for the string length word). Conversion starts at the 'i'th position in 'str' and continues until an EOS is encountered in 'str' or 'var' is completely filled. The function return is the number of characters packed. IMPLEMENTATION 'Ctov', like 'ctop', makes repeated calls on the standard macro 'spchar' to pack characters into the destination array. Once all characters in the string have been packed, or no room remains in the destination, 'ctov' sets the first word of the destination array to the number of characters it contains and returns this number as the function value. ARGUMENTS MODIFIED i, var SEE ALSO other conversion routines ('cto?*' and '?*toc') (2)