This is my primative code:


\newcommand{\setvalue}[1]{\pgfkeys{/variables, #1}}
  /variables/#1.is family,
  /variables/#1.unknown/.style = {\pgfkeyscurrentpath/\pgfkeyscurrentname/.initial = ##1}
\setvalue{varL = \StrLen{Hellow}}
\forloop{loop}{1}{\value{loop}< \protect\getvalue{varL}}{{\arabic{loop}}}

This is just the start of my bigger macro, but LaTeX does not like this command:

\value{loop}< \protect\getvalue{varL}

I need to send to \fooloop macro length of the word, which is changeable.

How I can solve the problem?

Thank you in advanced.

  • \getvalue{varL} is also integer or not? So why It should not work?
    – saldenisov
    Feb 11 '14 at 22:01

Code should be changed like this:

\forloop{loop}{1}{\value{loop}< \protect\getvalue{varL}}{{\arabic{loop}}}

Then it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.