Article View: comp.lang.postscript
Article #1971Re: PostScript coding style question
From: Bruce Cockburn
Date: Wed, 26 Aug 1992 11:27
Date: Wed, 26 Aug 1992 11:27
43 lines
2197 bytes
2197 bytes
How about this one from the Acorn graphics prologue.
Cheers, Bruce.
/WS 4096 string def % a pre-allocated string to hold 64
% rows of up to 64 bytes of sprite
% data. Also used in text printing.
% Pre-allocated to avoid VM wastage.
/RC {
WS 0 3 I put dup 1 gt {
WS 1 3 I put dup 2 gt {
WS 2 3 I put WS 3 3 I put dup 4 gt {
WS 4 WS 0 4 getinterval putinterval dup 8 gt {
WS 8 WS 0 8 getinterval putinterval dup 16 gt {
WS 16 WS 0 16 getinterval putinterval dup 32 gt {
WS 32 WS 0 32 getinterval putinterval dup 64 gt {
WS 64 WS 0 64 getinterval putinterval dup 128 gt {
WS 128 WS 0 128 getinterval putinterval dup 256 gt {
WS 256 WS 0 256 getinterval putinterval dup 512 gt {
WS 512 WS 0 512 getinterval putinterval dup 1024 gt {
WS 1024 WS 0 1024 getinterval putinterval dup 2048 gt {
WS 2048 WS 0 2048 getinterval putinterval
} if
} if
} if
} if
} if
} if
} if
} if
} if
} if
} if
} if pop pop
} bind def
Any views expressed are my own and are not necessarily those _--_|\
of Acorn. Any factual information is given in good faith and / \
neither I, nor Acorn can accept liability for loss or damage \_.--._/
resulting from its use. v
Technical Details
Message-ID:
<18052@acorn.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!bcockburnReferences:
<1992Aug25.204100.7821@sq.sq.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!bcockburn From: bcockburn@acorn.co.uk (Bruce Cockburn) Newsgroups: comp.lang.postscript Subject: Re: PostScript coding style question Message-ID: <18052@acorn.co.uk> Date: 26 Aug 92 11:27:56 GMT References: <1992Aug25.204100.7821@sq.sq.com> Sender: daemon@acorn.co.uk Organization: Acorn Computers Ltd, Cambridge, England Lines: 43