Jump to content

Language Reference - Variables question


avery
 Share

Recommended Posts

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

Link to comment
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?

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
Link to comment
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

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