Source PostScript (append.pps)

Retour Texte non formaté
%% syntaxe : string1 string2 append --> concatene les 2 chaines ou fusionne 2 tableaux /append { 3 dict begin dup isarray { /tab2 exch def /tab1 exch def [ tab1 aload pop tab2 aload pop ] } { /str2 exch def /str1 exch def /result str1 length str2 length add string def str1 result copy pop result str1 length str2 putinterval result } ifelse end } def %% %% fusionne 2 tableaux %% /append { %% 3 dict begin %% dup isarray { %% /tab2 exch def %% /tab1 exch def %% [ tab1 aload pop tab2 aload pop ] %% } { %% /str2 exch def %% /str1 exch def %% /result str1 length str2 length add string def %% str1 result copy pop %% result str1 length str2 putinterval %% result %% } ifelse %% end %% } def