Thread View: adobe.postscript.programming
4 messages
4 total messages
Started by zetab
Fri, 15 Aug 2008 07:14
Get procedure content from it's name
Author: zetab
Date: Fri, 15 Aug 2008 07:14
Date: Fri, 15 Aug 2008 07:14
13 lines
1012 bytes
1012 bytes
In PostScript, if I only know a procedure's name, can I find out the content of that procedure?
For example, if there is a procedure defined by
/abc {1 2 add} def
somewhere before, how can I get a output like
{1 2 add}
from the precedure's name "abc"?
I have tried "cvs" operator, but that only output the procedure name "abc".
Re: Get procedure content from it's name
Author: Aandi_Inston
Date: Fri, 15 Aug 2008 07:55
Date: Fri, 15 Aug 2008 07:55
6 lines
1019 bytes
1019 bytes
You can iterate through the elements of the procedure, and convert each one to a string. You will have to decide what to do if you find a nested procedure. Be warned that in rare cases a procedure could be nested in itself. Aandi Inston
Re: Get procedure content from it's name
Author: zetab
Date: Fri, 15 Aug 2008 11:06
Date: Fri, 15 Aug 2008 11:06
2 lines
741 bytes
741 bytes
But which operator can iterate through procedure? The "forall" operator can only iterate array, dictionary and string.
Re: Get procedure content from it's name
Author: Aandi_Inston
Date: Fri, 15 Aug 2008 11:33
Date: Fri, 15 Aug 2008 11:33
3 lines
867 bytes
867 bytes
A procedure is an array. Aandi Inston
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads