Jump to content

Recommended Posts

Posted (edited)

Hi,

Can anyone tell me if it's possible to declare variables with incremental names during a loop ?

I'm talking about something like:

For $i=1 to 5

dim $var & $i

Next

This would declare $var1, $var2, $var3, $var4, $var 5.

Thank you,

mex.

Edited by mexykanu
Posted

Hi again,

The variable i needed was not meant to be infinite, so this was the solution

dim $var[10]

For $i=1 to $myvar

$var[$i]=Other Stuff

Next

Where $myvar is somewhere between 2 and 7-8. $var[10] was bigger just to be sure

Thanks :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...