# How to pass PostScript expression to nodesep and offset when using ([…]node) syntax?

Quoted from pst-news13.pdf on page 3:

The labelsep is the first – optional – argument of \uput. It is now possible to use the PostScript notation for this length, eg {! 45 sin 3 mul}. Then the unit which is active when \uput is active is used. With a unit the PS notation is not allowed and leads to an error!

If labelsep (which is a length key) can accept an RPN expression, why can't nodesep and offset (which are also length keys) accept RPN expressions?

For the current implementation, angle can be expressed in RPN such as angle={!30 60 add}.

The following is the MWE for you.

\documentclass[pstricks,border=12pt]{standalone}

\begin{document}
\begin{pspicture}[showgrid](3,3)
\pnode{A}
\pnode
[!
60 cos 3 mul
60 sin 3 mul
](A){B}
\psline{->}(A)(B)
\end{pspicture}

%   \begin{pspicture}[showgrid](3,3)
%       \pnode{A}
%       \psline(A){->}([nodesep=,offset=]A)
%   \end{pspicture}
\end{document}

-

nodesep and offset are a length and must have a unit, at least the current one.

\documentclass{article}
\usepackage{pst-node}

\begin{document}
\begin{pspicture}[showgrid](3,3)
\pnode{A}
\pnode
[!
60 cos 3 mul
60 sin 3 mul
](A){B}
\psline{->}(A)(B)
\end{pspicture}

\bigskip
\begin{pspicture}[showgrid](3,3)
\pnode{A}
\psline{->}(A)(!\psGetNodeCenter{A}
A.x 60 cos 3 mul add
A.y 60 sin 3 mul add)
\end{pspicture}

\end{document}


-