root/trunk/jps2ps/pps/append.pps

Revision 4, 0.8 kB (checked in by jms, 8 months ago)

Chargement de jps2ps dans le SVN.

Line 
1 %% syntaxe : string1 string2 append --> concatene les 2 chaines ou fusionne 2 tableaux
2 /append {
3 3 dict begin
4    dup isarray {
5       /tab2 exch def
6       /tab1 exch def
7       [ tab1 aload pop tab2 aload pop ]
8    } {
9       /str2 exch def
10       /str1 exch def
11       /result str1 length str2 length add string def
12       str1 result copy pop
13       result str1 length str2 putinterval
14       result
15    } ifelse
16 end
17 } def
18
19 %% %% fusionne 2 tableaux
20 %% /append {
21 %% 3 dict begin
22 %%    dup isarray {
23 %%       /tab2 exch def
24 %%       /tab1 exch def
25 %%       [ tab1 aload pop tab2 aload pop ]
26 %%    } {
27 %%       /str2 exch def
28 %%       /str1 exch def
29 %%       /result str1 length str2 length add string def
30 %%       str1 result copy pop
31 %%       result str1 length str2 putinterval
32 %%       result
33 %%    } ifelse
34 %% end
35 %% } def
Note: See TracBrowser for help on using the browser.