This question is based on this answer.
It is a continuation of my previous qestion regarding list of values in latex.
According to first link there is a limitation on the number of arguments I have faced with.
I tried to use specified approach and it works well.
But what if I want to have more than 18 arguments?
Is it possible to use such approach recursively?
For example I want to define a function with 25 arguments. Is it possible to use next:
\newcommand\ParseOptMenuItemStoreA[9]{%
\def\tempa{#1}%
\def\tempb{#2}%
\def\tempc{#3}%
\def\tempd{#4}%
\def\tempe{#5}%
\def\tempf{#6}%
\def\tempg{#7}%
\def\temph{#8}%
\def\tempi{#9}%
\ParseOptMenuItemStoreB
}
\newcommand\ParseOptMenuItemStoreB[9]{%
\def\tempj{#1}%
\def\tempk{#2}%
\def\templ{#3}%
\def\tempm{#4}%
\def\tempn{#5}%
\def\tempo{#6}%
\def\tempp{#7}%
\def\tempq{#8}%
\def\tempr{#9}%
\ParseOptMenuItem
}
\newcommand\ParseOptMenuItem[7]{%
% Access to arguments #1-#18 via \tempa-\tempr and to argument #19-#25 via #1-#7.
}
I tried to compile it but I got an error:
! Missing number, treated as zero.
<to be read again>
\protect
l.40 }
So what I do wrong?
UPDATE 19.08.2015:
I have used next construction to achieve my goals:
\newcommand{\ParseOptMenuItemList}[1]
{
\def\tmplist{#1}%
\@tempcnta=\z@
\@for\tmp:=\tmplist\do{\advance\@tempcnta\@ne
\expandafter\let\csname temp\@roman\@tempcnta\endcsname\tmp
}%
\makebox[\linewidth][r]{%
\begin{tabular}{lc}
Possible values: \ifthenelse{\equal{\tempi}{}}{}{& \tempi\\}
\ifthenelse{\equal{\tempii}{}}{}{& \tempii\\}
\ifthenelse{\equal{\tempiii}{}}{}{& \tempiii\\}
\ifthenelse{\equal{\tempiv}{}}{}{& \tempiv\\}
\ifthenelse{\equal{\tempv}{}}{}{& \tempv\\}
\ifthenelse{\equal{\tempvi}{}}{}{& \tempvi\\}
\ifthenelse{\equal{\tempvii}{}}{}{& \tempvii\\}
\ifthenelse{\equal{\tempviii}{}}{}{& \tempviii\\}
\ifthenelse{\equal{\tempix}{}}{}{& \tempix\\}
\ifthenelse{\equal{\tempx}{}}{}{& \tempx\\}
\ifthenelse{\equal{\tempxi}{}}{}{& \tempxi\\}
\ifthenelse{\equal{\tempxii}{}}{}{& \tempxii\\}
\ifthenelse{\equal{\tempxiii}{}}{}{& \tempxiii\\}
\ifthenelse{\equal{\tempxiv}{}}{}{& \tempxiv\\}
\ifthenelse{\equal{\tempxv}{}}{}{& \tempxv\\}
\ifthenelse{\equal{\tempxvi}{}}{}{& \tempxvi\\}
\ifthenelse{\equal{\tempxvii}{}}{}{& \tempxvii\\}
\ifthenelse{\equal{\tempxviii}{}}{}{& \tempxviii\\}
Default value: & \tempxix\\
\end{tabular}
}
}
\ParseOptMenuItemList takes values as a comma separated list.

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Paul Gaborit Jul 08 '15 at 13:33\foo{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}– David Carlisle Jul 08 '15 at 13:33