Jump to content

Arrays.


Recommended Posts

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]
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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]
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...