# Forloop macro does not work with other macro in condtion

This is my primative code:

\documentclass{article}
\usepackage{xstring}
\usepackage{ifthen}
\usepackage{pgfkeys}

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


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?

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

\begin{document}