Hello,
Have a look at the calc package! It brings changes to the arguments and
lengths of the counters.
I had the same problem when I created the pst-soroban package. (Have a
look to pst-soroban.sty-CTAN)
Hope this helped.
Alain Delmotte
Arek Kuźniewski a écrit :
> I need to define function (in pstricks mode) for drawing lines.
> Function should work like this:
> ------------
> \def\newhline(#1,#2){#3}{\psline(#1,#2)(#1+#3,#2)
> ------------
> Of course this function doesn't work.
> How can I define this function? If I needed only integer values of #1
> and #3, I would do it by counters, for example:
> ------------
> \newcounter{nhlc}
> \def\newhline(#1,#2){#3}{\setcounter{nhlc}{#1}\stepcounter{nhlc}{#3}
> \psline(#1,#2)(\thenhlc,#2)}
> -------------
> But the problem is, that I need #1 and #3 in real (e.g. #1=1.2 and
> #3=4.3).
> The second definition doesn't work for it.
>
> Is some way to define function for calculation #1+#3?
> --
> Arek
>
> In darkness there can be light.
> In misery there can be beauty.
> In death there can be life.
>