2009/11/18

PostScript GhostScript, some operators

 

GS>(abcdefghijk) 3 4 getinterval ==
(defg)

 

GS>/s (abcdefghijk) def
GS>s 3 (WXYZ) putinterval
GS>s ==
(abcWXYZhijk)

 

GS>(437) cvi ==
437

 

GS>(3.14) cvr ==
3.14

 

GS>(kpf) cvn ==
/kpf

 

GS>437 3 string cvs ==
(437)

 

GS>(kpf) (9LISP) 123 5
GS<4>pstack
5
123
(9LISP)
(kpf)

 

GS<4>stack
5
123
9LISP
kpf
GS<4>

 

GS>(kpf) (9LISP) (hoge)
GS<3>pop
GS<2>stack
9LISP
kpf

 

GS<2>count ==
2
GS<2>count

GS<3>stack
2
9LISP
kpf
GS<3>pop
GS<2>count ==
2

 

GS<2>clear
GS>stack
GS>

 

GS>398 dup
GS<2>pstack
398
398

 

GS<2>(a) (b) (c) 2 index
GS<6>pstack
(a)
(c)
(b)
(a)
398
398

 

GS<6>(a) (b) (c) 3 copy
GS<12>pstack
(c)
(b)
(a)
(c)
(b)
(a)
(a)
(c)
(b)
(a)
398
398

 

GS<12>clear

 

GS>(a) (b) (c) exch
GS<3>pstack
(b)
(c)
(a)

 

GS<3>(9) (L) (I) (S) (P) 4 3 roll
GS<8>pstack
(L)
(P)
(S)
(I)
(9)
(b)
(c)
(a)
GS<8>

 

GS>100 mark 1 2 3 4 5
GS<7>pstack
5
4
3
2
1
-mark-
100

 

GS<7>counttomark
GS<8>==
5
GS<7>counttomark ==
5

 

GS<7>cleartomark
GS<1>pstack
100
GS<1>

0 件のコメント:

コメントを投稿