Jump to content

Updating a 1D array


Recommended Posts

I appreciate this seems like a trivial question, but my searching has failed....

I was using a 1D array as follows:

Local $DataName[3] = [2, $sBaseFileName, $sUpdatedFileName]

And all was OK. I then wanted to separate the declaration from the assignment and assumed I could do something like:

Local $DataName[3]
$DataName = [2, $sBaseFileName, $sUpdatedFileName]

;or

$DataName[] = [2, $sBaseFileName, $sUpdatedFileName]

But I see I cannot. I am aware that I can add the 3 elements 1 at a time with _ArrayAdd, but is there a simple inline method like I was trying for?

Problem solving step 1: Write a simple, self-contained, running, replicator of your problem.

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

×
×
  • Create New...