I am a newbie and I asked in How to create rectangles like in this example? about how to make some rectangles. I am trying to read the code and understand it as I need rectangles rather than squares. But I cannot find in the net what this #1 to #4 are? As the notation is short I can't even search it up. So I would be happy if somebody helps me with it.
\newcommand\catalannumber[3]{
% start point, size, Dyck word (size x 2 booleans)
\fill[cyan!25] (#1) rectangle +(#2,#2);
\fill[fill=lime]
(#1)
\foreach \dir in {#3}{
\ifnum\dir=0
-- ++(1,0)
\else
-- ++(0,1)
\fi
} |- (#1);
\draw[help lines] (#1) grid +(#2,#2);
\draw[dashed] (#1) -- +(#2,#2);
\coordinate (prev) at (#1);
\foreach \dir in {#3}{
\ifnum\dir=0
\coordinate (dep) at (1,0);
\else
\coordinate (dep) at (0,1);
\fi
\draw[line width=2pt,-stealth] (prev) -- ++(dep) coordinate (prev);
};
}

#1and so on have nothing to do with TikZ; they represent the arguments: when you call\catalannumber{arg1}{arg2}{arg3},#1will be replaced byarg1and so on. – egreg Apr 05 '13 at 21:39\catalannumber). In lay terms, "#1" refers to the first argument passed to\catalannumber, "#2" refers to the second argument, etc. – jub0bs Apr 05 '13 at 21:40##symbol in an argument – percusse Apr 05 '13 at 21:51