[pstricks] Where the $#@$#@ is the Div operator defined?!

Jean-Côme Charpentier jean-come.charpentier at wanadoo.fr
Mon Jan 24 18:17:35 CET 2011


Le 24/01/2011 15:42, A. Erhardt a écrit :
> div is divide - don't remember integer divide or real divide.
>
> Just try:
>
> 9 2 div is either 4 or 4.5

   It depends what you do with this. Without any context, it's 4.5:

-----%<----- galley.ps -----%<-----
/r 9 2 div def        % r = integer or real?
/result 10 string def % create string
/Helvetica findfont 12 scalefont setfont % set font
100 600 moveto                           % set currentpoint
r 10 result cvrs show % show r in decimal (10) using string result
-----%<--------%<-----------%<-----

   Jean-Côme Charpentier


More information about the PSTricks mailing list