Article View: comp.lang.postscript
Article #825newcomer, need help with forall
From: J|rgen N|rgaard
Date: Wed, 09 Aug 1989 11:43
Date: Wed, 09 Aug 1989 11:43
48 lines
2243 bytes
2243 bytes
Hello everybody,
As I'm quite new to PostScript and having a problem I do not understand
I hope somebody experienced can help me.
Consider the following program:
/Helvetica findfont 10 scalefont setfont
100 100 translate
/en { gsave 0 0 moveto 1 10 string cvs show grestore } def
/to { gsave 0 0 moveto 2 10 string cvs show grestore } def
/tre { gsave 0 0 moveto 3 10 string cvs show grestore } def
/fire { gsave 0 0 moveto 4 10 string cvs show grestore } def
%% method one
[en to tre fire]{ 0 50 translate exec} forall showpage
100 100 translate
%% method two
[1 2 3 4]{ 0 50 translate 0 0 moveto 10 string cvs show} forall showpage
I would expect "method one" and "method two" to be equivalent. But they are
not, but why ?
(method one prints all characters on top of each other,
method two prints all characters one above the other:
4
3
2
1 )
In the PostScript book (Adobe on Addison-Wesley) the "forall" operator
is not (as I understand it) documented to save something.
(Equipment: DEC LN03R, ScriptPrinter Version 47.2)
Hope someone can enlighten me on this.
-- --
| Regards, J|rgen N|rgaard ('|' is '\o{}' in \LaTeX{}) |
| e-mail: jnp@tele.nokia.fi or pedersen%tnclus.dnet@tele.nokia.fi |
-- telephone: <..>-358-0-511-5671 --
--
-- --
| Regards, J|rgen N|rgaard ('|' is '\o{}' in \LaTeX{}) |
| e-mail: jnp@tele.nokia.fi or pedersen%tnclus.dnet@tele.nokia.fi |
-- telephone: <..>-358-0-511-5671 --
Technical Details
Message-ID:
<JNP.89Aug9134311@mjolner.tele.nokia.fi>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!att!pacbell!ames!sun-barr!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!mjolner!newshost!jnpShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!att!pacbell!ames!sun-barr!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!mjolner!newshost!jnp From: jnp@mjolner.tele.nokia.fi (J|rgen N|rgaard) Newsgroups: comp.lang.postscript Subject: newcomer, need help with forall Message-ID: <JNP.89Aug9134311@mjolner.tele.nokia.fi> Date: 9 Aug 89 11:43:11 GMT Sender: news@mjolner.tele.nokia.fi Distribution: comp Organization: none Lines: 48