Repeat until...

Repeat until...

Hi, I'm sorry, my English is very little.

This is the problem:

if((input.subdep  ==  "mag_01"))
{
    a001.mag01=(a001.mag01  +  a000.m001);
    a002.mag01=(a002.mag01  +  a000.m002);
    a003.mag01=(a003.mag01  +  a000.m003);
    a001.Quantit_IN=(a001.Quantit_IN  -  a000.m001);
    a002.Quantit_IN=(a002.Quantit_IN  -  a000.m002);
    a003.Quantit_IN=(a003.Quantit_IN  -  a000.m003);
}

Now... is possible to use a function to increase the value of form and field name?

a00x
with x = x+1 until x = y

a001
a002
a003
...
a00y


thank's