! Macros for string handling. COMPILETIME %NAME('S\N') = 0; MACRO STRING_LENGTH(STRNAME) = %NAME(STRNAME, '\L') %; MACRO DESCRIPTOR(STRNAME) = %NAME(STRNAME, '\D') %; MACRO %NAME('S\AUX')(SN, S, SNUM) = MACRO SN = %NAME('S\', SNUM) %QUOTE % ; LITERAL %NAME(SN, '\L') = %CHARCOUNT(S); BIND SN = UPLIT BYTE (S); %; MACRO PSLIT(STRNAME, STR) = %ASSIGN (%NAME('S\N'), %NAME('S\N')+1); %NAME('S\AUX')(STRNAME, STR, %NUMBER(%NAME('S\N'))); %; MACRO PDSLIT(STRNAMED, STRD) = PSLIT(STRNAMED, STRD); BIND %NAME(STRNAMED, '\D') = UPLIT(STRING_LENGTH(STRNAMED), %NAME(STRNAMED)); %;