Sign in to follow this  
Followers 0
jasny

arrays in array

3 posts in this topic

Guys, can you tell me how to make it work in Autoit ? :

Global $books[6][1]
Dim $book[1]
$book[0] = "Suvorow"
$books[0] = $book

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You already did it.

Global $books[6][1]
Dim $book[1]
$book[0] = "Suvorow"
$books[0][0] = $book

Note that $books is two dimensional, you can't skip dimensions!

To use book later, use a temporary variable to reverse what you did.

$temp = $books[0][0]

consolewrite($temp[0])

By the way, you shouldn't use Dim. Better to specify scope, less confusion later.

If you have any questions, look at the Array Tutorial in the wiki.

Edit: edits

Edited by AdmiralAlkex

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