I can't seem to get definitions of constants working in TikZ. I looked at this related question question and that too did not work for me. This example works, but not if the swap the \coordinate definition:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{ifthen}
\newcommand{\PI}{3.14}
\newcommand{\ValueOf}[1]{%
\ifthenelse{\equal{#1}{PIE}}{3.14159}{}%
\ifthenelse{\equal{#1}{E}}{2.78}{}%
}
\begin{document}
Value of -PIE is -\ValueOf{PIE}.\par
Value of E is \ValueOf{E}.
\begin{tikzpicture}
\coordinate (PointA) at (-\PI,-1); % Only this works
%\coordinate (PointA) at (-\ValueOf{PIE},-1);
%\coordinate (PointA) at (\pgfextra{\pgfmathparse{-\ValueOf{PIE}}},-1);
\draw (PointA) circle (1);
\end{tikzpicture}
\end{document}
In case it is related, the package versions I have are:
pgfplots 2010/07/14 Version 1.4
pgf 2008/01/15 v2.00 (rcs-revision 1.12)
\coordinate (PointA) at (2*e-4,2/3*pi);works as expected. – Caramdir Apr 06 '11 at 16:18