Jump to content

create an array of unknown size


Recommended Posts

i want an array, but im not sure how big because i need user input to determine that.

should i just make some huge number that will most likely not be reached?

or is there a better way?

something like this.

$i = 0
while 1
$test[$i] = inputbox("testing","enter some stuff, type EXIT to exit")
$i = $i + 1
if $test[$i] = "exit" then
exit
endif
wend

what would i call before that....

dim $test[9999];????????????????

i doubt the user has that much info to enter, but i just dont know how much!

this is more programming related than general autoit related, but i figured i would ask here anyways :)

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

dim $test[1]
$i = 0
while 1
   redim $test[$i + 1]
   $test[$i] = inputbox("testing","enter some stuff, type EXIT to exit")
   if $test[$i] = "exit" then
   exit
endif
wend

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...