Sign in to follow this  
Followers 0
t0ddie

create an array of unknown size

4 posts in this topic

#1 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

 

Share this post


Link to post
Share on other sites

ty


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

Share this post


Link to post
Share on other sites

look at it again, was typing it in and hit a key like i do in my editor, it entered the code before i was finished.


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

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  
Followers 0