I have the following code:
\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[node distance = 0.5cm, auto]
\node (0) {Block 0};
\node (1) [below= of 0.south] {Block 1};
\node (2) [below= of 1.south] {Block 2};
\end{tikzpicture}
\end{document}
It prints this:

I tried to do the same with pgf loop, but don't know how to decrease the counter:
\foreach \x in {0,...,2}
{
\ifnum\x=0\relax
\node (\x) {Block \x};
\else
%\prev=\x - 1 <- ???
\node (\x) [below= of \prev.south] {Block \x};
\fi
}

.southis not needed, see Package PGF Math Error: Unknown operator – Qrrbrbirlbel Apr 23 '13 at 21:42positioninglibrary at the top snippet. So, it's ok. – user4035 Apr 23 '13 at 21:48positioninglibrary actually makes=ofpossible. What I meant was, thatbelowimplicitly sets the.southanchor of the “of” node. It doesn’t hurt either. – Qrrbrbirlbel Apr 23 '13 at 21:53\foreach \x [remember=\x as \eval] in …and don't need to calculate anything. – Qrrbrbirlbel Apr 26 '13 at 17:16