Jump to content
Sign in to follow this  
GordonFreeman

"For" With "case"

Recommended Posts

GordonFreeman

I need:

For $i = 1 to 5

case $i

$read = IniRead("test.ini", "test", "test" & $i, "error")

Next

Well, I need it to not have to define the various cases in my script already that they perform the same function

logically instead of numbers has to be the respective names of the variables

is it possible? or I have to define each case

Edited by GordonFreeman

Share this post


Link to post
Share on other sites
Blue_Drache

Look up Arrays in the help file.

Dim $read[6]

For $i=1 to 5
  $read[$i] = IniRead("test.ini", "test", "test" & $i, "error")
Next
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
GordonFreeman

Exactly, I was supposed to exemplify this, but need to do this the button, since their names are the buttons: $ button1, $ button2, $ button3, $ button4, $button5

anyway, I appreciate the help

Share this post


Link to post
Share on other sites
Blue_Drache

It doesn't matter what you call the array... You can call it $read[x] or you can call it $button[x]


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×