Jump to content

Recommended Posts

Posted

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.

Posted (edited)

Thanks Subz. Ugly, but effective....

Edit: My bad, ignore the old edit.

 

 

Edited by SlackerAl
Error noted.

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

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
×
×
  • Create New...