while loop to create list using xpress

I have a string 'myname' and i want to create a loop that increments 1 to 3 and appends the count to the string. In this case, the result desired result is:

<List>

<s>myname1</s>

<s>myname2</s>

<s>myname3</s>

</List>

How can this be done? I believe a <while> is needed>

[371 byte] By [R_L123] at [2007-11-26 10:30:07]
# 1

The below code would do it

<block>

<defvar name='prefix'>

<s>myname</s>

</defvar>

<defvar name='i'>

<i>1</i>

</defvar>

<set name='mylist'>

<list/>

</set>

<while>

<lt>

<ref>i</ref>

<i>4</i>

</lt>

<append name='mylist'>

<concat>

<ref>prefix</ref>

<ref>i</ref>

</concat>

</append>

<set name='i'>

<add>

<ref>i</ref>

<i>1</i>

</add>

</set>

</while>

<ref>mylist</ref>

</block>

chits98 at 2007-7-7 2:36:28 > top of Java-index,Web & Directory Servers,Directory Servers...