REDUCE

10.9 I/O to and from Lists and Strings

(bldmsg FORMAT:string, [ARGS:any]): string expr
Printf to string. This can be used as a very convenient way of obtaining the printed representation of an object for further analysis. In many cases it is also a very convenient way of constructing a needed string. An error will occur on overflow. Overflow occurs when the length of the result exceeds the value of maxtokensize.
⋆⋆⋆⋆⋆ Buffer overflow while constructing error message: FORMAT

(flatsize U:any): integer expr
Character length of prin1 S-expression.

(flatsize2 U:any): integer expr
Prin2 version of flatsize.

(explode U:any): id-list expr
Explode takes the constituent characters of an S-expression and forms a list of single character ids. It is implemented via the function channelprin1, with a list rather than a file or terminal as destination. Returned is a list of interned characters representing the characters required to print the value of U.
    1 lisp> (explode 'foo)  
    (f O O)  
    2 lisp> (explode '(a . b))  
    (!( a !  !. !  b !))

(explode2 U:atom-vector): id-list expr
Prin2 version of explode.

(compress U:id-list): atom-vector expr
U is a list of single character identifiers which is built into a PSL entity and returned. Recognized are numbers, strings, and identifiers with the escape character prefixing special characters. The formats of these items appear in the ”Primitive Data Types” Section, Section 2.1.2. Identifiers are not interned on the id-hash-table. Function pointers may not be compressed. If an entity cannot be parsed out of U or characters are left over after parsing an error occurs:
    ⋆⋆⋆⋆⋆ Poorly formed atom in COMPRESS

(implode U:id-list): atom expr
Compress with ids interned.