On page 3/7 fp package documentation we read:

%repeat last test

\ifFPtest ...\else...\fi % repeat last test

I really could not understand this. That is why I wrote a code as below to see what \ifFPtest does:


\FPset\x{-2} %sets x=-2
\FPset\y{3} %sets y=3

\node at ( 0,1) {$x=\x$};
\node at ( 0,2) {\ifFPtest {1}\else{2}\fi };% repeat last test

But got an error: ! Undefined control sequence. l.11 \node at ( 0,2) {\ifFPtest {1}\else{2}\fi };% repeat last test ? Does anyone know what \ifFPtest does and how it works?

1 Answer 1


\ifFPtest allows you to use the result of a test later:





some text ...
\ifFPtest yes \else no\fi

some text ...
\ifFPtest yes \else no\fi


Side remark: I wouldn't use tikz and standalone to test such things. Both add layers that can make it difficult to trace code and errors.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .