Yes. You have to complete your procedure definition, though, with a "def" or even better a "bind def". The bind operator forces early binding... meaning that the operators within the proc are replaced by the actual code in systemdict at time of defintion.
If your main concern is to sequentially "print" an arbitrary collection of strings down the page, may I suggest an approach?
Write your strings out to a file, terminating each with a valid line termination character or characters. Then use "readline" to pull them in and show them.
You can even write these strings to a PostScript program, and use the "currentfile" operator.
Your program structure might be as follows:
Code:
%!PS
/someProc
{ x y moveto show
% y would be a procedure to show a string and then
% reposition to nextline
} bind def
/buffstr 256 string def
/readProc
{
{ currentfile buffstr readline
exch someProc
not {exit} if
} loop
} bind def
readProc
(This is sentence one.)
(This is sentence two.)
(This is sentence three.)
I haven't tested this, but you should get the general idea.
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting