[pstricks] Testing a number

John Smith chessfan123 at hotmail.com
Wed Jun 18 01:57:16 CEST 2008

Is there a way to test is a number is zero, positive or negative? I tried this using the FP package as follows.
\def\test#1{\FPifzero{#1} 0 \else \FPifpos{#1} 1 \else -1 \fi \fi}
It works if the number is positive or negative but gives a Tex error about an extra \fi if the input is zero.
Be part of history. Take part in Australia's first e-mail archive with Email Australia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20080617/077fedba/attachment.html 

More information about the PSTricks mailing list