[Tex/LaTex] tikz node name and calculation

nodespgfmathtikz-pgf

I can't find out why the following code :

\documentclass[border=0mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.multipart, fit,backgrounds,calc}

\begin{document}
\begin{tikzpicture}
\node(poste1){poste};
\foreach\x in {1,...,5}{%
\pgfmathparse{\x+1}
\node[right=of poste\x](poste\pgfmathresult){poste\pgfmathresult};
}
\end{tikzpicture}

doesn't work.
With this code

\documentclass[border=0mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.multipart, fit,backgrounds,calc}

\begin{document}
\begin{tikzpicture}
\node(poste1){poste};
\foreach\x in {1}{%
\pgfmathparse{\x+1}
\node[right=of poste\x](poste\pgfmathresult){poste\pgfmathresult};
}

\end{tikzpicture}
\end{document}

\end{document}

it appears that the \pgfmathresult command return a wrong number hence the error but I don't know why this occurs.
Could somebody help me please?

Best Answer

Simpler than use of \pgfmathparse is:

\documentclass[border=0mm,tikz]{standalone}
\usetikzlibrary{%backgrounds,calc,fit,
                positioning,
                %shapes.multipart
                }

\begin{document}
\begin{tikzpicture}[node distance= 2mm]
\node (poste1) {poste1};
\foreach \x [count=\xx from 2] in {1,2,...,5}
{
\node[right=of poste\x] (poste\xx) {poste \xx};
}
    \end{tikzpicture}
\end{document}

enter image description here