The following works:
\documentclass{article}
\usepackage{longtable}
\begin{document}
\newcount\n
\n=0
\begin{longtable}{ccc}
\loop
\ifnum\n<10
\advance\n by1
hello
\repeat
\end{longtable}
\end{document}
The following does not work:
\documentclass{article}
\usepackage{longtable}
\begin{document}
\newcount\n
\n=0
\begin{longtable}{ccc}
\loop
\ifnum\n<10
\advance\n by1
col1 & col2 & col3 \\
\repeat
\end{longtable}
\end{document}
Why?



