According to the pstricks-add manual on near the last page, dup is used to duplicate the value of the previous stack. Duplicating can simplify an RPN expression.
For the sake of simplicity, let's consider the following example. A line of length 3 unit at a slope of 30 degrees is first drawn. The end point of this line (which is not on the origin) will be marked with a dot. I wrote 4 possible RPN notations for the dot, as follows:

\documentclass{article}
\usepackage{pstricks-add}
\usepackage{enumerate}
\def\theta{30}
\def\radius{3}
\parskip=40pt
\parindent=0pt
\begin{document}
\begin{enumerate}[a.]
\item\verb|\theta\space dup cos \radius\space mul sin \radius\space mul|\\[20pt]
\begin{pspicture}[showgrid](3,2)
\psline(\radius;\theta)
\psdot[linecolor=red](!\theta\space dup cos \radius\space mul sin \radius\space mul)
\end{pspicture}\\[20pt]
\item\verb|\radius\space dup \theta\space cos mul \theta\space sin mul|\\[20pt]
\begin{pspicture}[showgrid](3,2)
\psline(\radius;\theta)
\psdot[linecolor=green](!\radius\space dup \theta\space cos mul \theta\space sin mul)
\end{pspicture}\\[20pt]
\item\verb|\radius\space \theta\space cos mul \radius\space \theta\space sin mul|\\[20pt]
\begin{pspicture}[showgrid](3,2)
\psline(\radius;\theta)
\psdot[linecolor=blue](!\radius\space \theta\space cos mul \radius\space \theta\space sin mul)
\end{pspicture}\\[20pt]
\item\verb|\theta\space cos \radius\space mul \theta\space sin \radius\space mul|\\[20pt]
\begin{pspicture}[showgrid](3,2)
\psline(\radius;\theta)
\psdot(!\theta\space cos \radius\space mul \theta\space sin \radius\space mul)
\end{pspicture}\\[20pt]
\end{enumerate}
\end{document}
In the first two examples, I got wrong dots. But the last 2 examples, the dots are drawn correctly. How to use the keyword dup ?
