[pstricks] Naive question

Pedro Jorge Caridade caridade at qta.qui.uc.pt
Fri Apr 29 15:48:23 CEST 2005


I'm starting to get inside pstricks codes, and try to write some very
simple. I have two questions, very naive, that I don't understand very
clearly:

How to pass arguments to my functions. For example I have this simple
code:
\makeatletter
\def\ArrowPolygon{\pst at object{ArrowPolygon}}
\def\ArrowPolygon at i%
{\@ifnextchar[{\ArrowPolygon@@ii}{\ArrowPolygon@@ii[]}}
\def\ArrowPolygon@@ii[#1](#2)(#3,#4)(#5,#6){%
\typeout#2%
\typeout#3%
\typeout#4%
\typeout#5%
\typeout#6%
}
....
\ArrowPolygon(1,-1)(20,5)(10,15)
....
The output confused me: 1,2,4,1,1. It saves only the first character.

-What should I do to pass the complete value? 

-In the case of argument #2, I would like to pass everything. Is there
then a way to then decompose in two values, or its better to use two
arguments instead of one?
 
Sorry for this very naive questions. 
Pedro 






More information about the PSTricks mailing list