The following will create saveboxes \MyStringa to \MyStringz:
\makeatletter
\count@=0
\loop\ifnum\count@<26
\advance\count@\@ne
\expandafter\newsavebox\csname MyString\@alph\count@\endcsname
\repeat
\makeatother
It's also simple (even simpler) with expl3:
\usepackage{expl3}
\ExplSyntaxOn
% loop from 1 to 26, #1 denotes the current value in the cycle
\int_step_inline:nn { 26 }
{
\exp_args:Nc \newsavebox { MyString \int_to_alph:n { #1 } }
}
\ExplSyntaxOff
With \exp_args:Nc we jump over \newsavebox and form a control sequence token from the braced argument before \newsavebox is actually performed.
In the log file we'll find something like
\MyStringa=\box46
\MyStringb=\box47
\MyStringc=\box48
[...similar lines...]
\MyStringy=\box70
\MyStringz=\box71
confirming that the allocations have been performed.
\newsaveboxis that it requires a control sequence rather than just a string. Hence the use of\csname ...\endcsnameto construct the control sequence. – Werner Jul 31 '13 at 20:32newsaveboxit works if I add the backslash\, however I have issues with actually using the box later. – ted Jul 31 '13 at 20:36