[texhax] "casting" Arrayjob to FP?
Brandon Kuczenski
brandon at 301south.net
Mon May 10 08:27:16 CEST 2010
Hi all,
I'm trying to use arrayjob (http://ctan.org/pkg/arrayjob/)to store
numerical data which I handle with pstricks. Previously I've used fp
(http://ctan.org/pkg/fp/) to perform useful arithmetic on data. However,
fp doesn't seem to play immediately well with arrayjob.
The following does not work as expected:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{minimal}
\usepackage{fp}
\usepackage{arrayjob}
\begin{document}
\newarray\Fooarray
\readarray{Fooarray}{1.34}
\def\firstnumber{0.34}
\def\secondnumber{1.34} %% this works
\def\secondnumber{\Fooarray(1)} %% this doesn't
\FPadd\result\firstnumber\secondnumber
\FPclip\result\result
\fbox{\result}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Suggestions? How can I 'cast' an arrayjob entry to an FP value?
-Brandon
More information about the texhax
mailing list