<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Myriad Pro">Hi Patrick,<br>
<br>
another possible approach just came into my mind. Using the
'fp-package'.<br>
Some easy arithmetic operations are possible.<br>
<br>
\documentclass{article}<br>
\usepackage{pstricks,pstricks-add}<br>
\usepackage[nomessages]{fp}<br>
\begin{document}<br>
\def\MyRadius{0.7}<br>
\FPmul{\MyDiameter}{\MyRadius}{2}<br>
\begin{pspicture}(-4,-4)(4,4)<br>
\psset{unit=1cm}<br>
\SpecialCoor<br>
\psline(\MyRadius,0)(\MyDiameter,0)<br>
\end{pspicture}<br>
\end{document}<br>
<br>
Regards,<br>
<br>
Juergen<br>
</font><br>
Patrick Drechsler wrote:
<blockquote cite="mid:873avgp3yw.fsf@pdrechsler.de" type="cite">
  <pre wrap="">Hi,

how do I do simple arithmetics in tex and use them in pstricks?

I am thinking along the lines of:

\SpecialCoor%
\def\MyRadius{0.7cm}%
\def\MyDiameter{! \MyRadius 2 mul}%
%
\psline(\MyRadius,0)(\MyDiameter,0)

I know this will not work. I am wondering what the correct approach
would look like...

TIA,

Patrick 
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">-- 
  j&uuml;rgen gilg
  austr. 59
  70376 stuttgart

tel       0711-59 27 88
e-mail    <a class="moz-txt-link-abbreviated" href="mailto:gilg@acrotex.net">gilg@acrotex.net</a>
website   <a class="moz-txt-link-abbreviated" href="http://www.acrotex.net">www.acrotex.net</a>
          <a class="moz-txt-link-abbreviated" href="http://www.gilligan-online.de">www.gilligan-online.de</a>
          <a class="moz-txt-link-abbreviated" href="http://www.brueckenkurs-physik.de">www.brueckenkurs-physik.de</a></pre>
</body>
</html>