Sign in to follow this  
Followers 0
avery

Language Reference - Variables question

5 posts in this topic

Can you do something like $array[$key] = $value

Where value could be an array even?

I understand I can do $array[#] and get a value and use dimensions

Should I be using iniread and write for these kind of things or can I just use memory instead?


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites



Can you do something like $array[$key] = $value

Where value could be an array even?

I understand I can do $array[#] and get a value and use dimensions

Should I be using iniread and write for these kind of things or can I just use memory instead?

Greetings,

I'm not sure whether I understand the question. Are you asking whether you can store an array inside an array? That would be multi-dimensional and if that was your question, go ahead and try it because it should work. I can't honestly say for sure though since i've never had occasion to use a multi-dimensional array.

Regards,

Eradicator

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks for response. I'm confused too :\

Instead of using a number for the array index can I use a variable that I get from a string?

Edit:

Never mind.

IniDelete, IniRead, FileWriteLine, IniReadSection, IniReadSectionNames, IniWrite

Will do all these with files.

I think perl corrupted me terribly

Edited by avery

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

Thanks for response. I'm confused too :\

Instead of using a number for the array index can I use a variable that I get from a string?

I don't know about getting a variable from a string, I don't know what you mean by that, but you can do things like this.

Dim $string[3] = ["Y","HALO","THAR"]
$num = 2
$i = 0

For $i = 0 to $num Step 1
    MsgBox(0,"Test",$string[$i])
Next

Regards,

Eradicator

Share this post


Link to post
Share on other sites

If you are using a number variable to index, yes, but no other types allowed.

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