[pstricks] \psPrintValue & /MoverN
Luis Sequeira
lfsequeira at gmail.com
Tue Jul 17 12:58:50 CEST 2012
>> Hi all
>>
>> I'm trying to use \multido to print a row of binomial coefficients using \psPrintValue.
>>
>> However I think it's my lack of understanding with the way the PS stack works and also of \psPrintValue.
>>
>> Doing \psPrintValue{3 0 /MoverN} shows "MoverN".
>>
>> Doing \psPrintValue{/MoverN 3 0} shows "0" (which is just the second "0")
>>
>> How should I get the two numbers required into the stack?
>>
>> Thanks
>>
>> Hubert
>>
>
> The command should print the value that is at the top of the stack.
> The operands are supposed to be put on the stack first, and then the operator should be applied; hence there is no surprise in the second version printing 0.
>
> I think the question is how MoverN is defined. I haven't been able to find its definition. Regular postscript operators like "add" or "div" don't have a slash prepended to them.
> Trying your example without the slash gave a postscript error, which indicates that MoverN is not a recognized operator.
>
> Where is that MoverN defined (and how)?
>
> Luis Sequeira
I just updated my TeX distribution (with the new MacTeX 2012 - the packaged mac version of TeXLive 2012).
Now I can really test your code, and give you the answer: drop the slash:
\psPrintValue{3 0 MoverN}
gives 1, as expected; although for other values, I get a decimal place - for example, 28,0 instead of 28 for \psPrintValue{8 2 MoverN}
Luis Sequeira
More information about the PSTricks
mailing list