I want to animate PSTricks diagram, so looping is intensively used. I have 3 global variables \START, \STOP, \DELTA that should be declared in the preamble. The remaining variables in the body will make use of these 3 global variables.
The looping macro \multido needs an integer that represents how many times it must repeat the given job. Unfortunately, this value is not given explicitly but It can be obtained from a simple formula \STOP-\START divided by \DELTA. I need a simple way to find this number in integer rather than in floating point number.
Finding \INITIAL variable by taking advantage of \dimexpr and \strip@pt is also not so natural I think.
The following coding flow looks too complicated, I need more fluid approach.
\documentclass{minimal} \parindent=0pt \usepackage{multido} \newcommand\START{-1} \newcommand\STOP{1} \newcommand\DELTA{0.01} % to do division only, but the result in floating point \pstFPdiv\TempTimes { \the \dimexpr \STOP pt -\START pt \relax } {\DELTA} \makeatletter \newcommand\INITIAL { \strip@pt \dimexpr \START pt +\DELTA pt \relax } % to make it an integer \newcommand\TIMES { \strip@pt \dimexpr \TempTimes pt \relax } \makeatother \begin{document} \multido { \nx=\START+\DELTA, \ny=\INITIAL+\DELTA } {\TIMES} { (\nx,\ny)\endgraf } \end{document}