Sign in to follow this  
Followers 0
the_lord_mephy

Arrays.

6 posts in this topic

#1 ·  Posted (edited)

Alright I really don't understand how to declare an array in which the amount of elements it contains is declared by a variable.

I tried doing

Dim $arary[$i]

and that didn't work, Please don't yell at me :idiot: I read the helpfile and it didn't do anything lol

Edited by the_lord_mephy

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Alright I really don't understand how to declare an array in which the amount of elements it contains is declared by a variable.

<{POST_SNAPBACK}>

something like:

$i=3
Dim $Array[$i]
$Array[0] = '1'
$Array[1] = '2'
$Array[2] = '3'
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ook I got it nevermind.


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

yeah I got it, It's because I forgot about the [0] so I was getting the error that it exceeded the elements. I had to do

Dim $array[$i + 1]


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

yeah I got it, It's because I forgot about the [0] so I was getting the error that it exceeded the elements. I had to do

Dim $array[$i + 1]

<{POST_SNAPBACK}>

Ahhh, you didn't tell us the whole story and you wanted to see if we could guess your error... :idiot::D

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Tehe, sorry :idiot:


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

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