Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently November 1st, 2024, 9:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: OpusScript nested arrays
PostPosted: June 11th, 2007, 7:41 am 
Offline

Joined: April 14th, 2007, 4:06 pm
Posts: 6
I'm having difficulties coding nested arrays, ie. it just can't be done.

Eg. var state = [[],[],[],[]];
Eg2. var r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]];

I get syntax errors on all attempts. What is wrong with these two statements?

yet, in this example, I don't get syntax errors
eg. var state = state[a[1],b[2],c[3],d[4]];

This all stems from trying to output a textblock encrypted via AES to launch a file. Can a custom job be done? Can OpusScript be fixed to instantiate an empty nested array?

I have full JS's of what I need.


Top
 Profile  
 
 Post subject:
PostPosted: June 11th, 2007, 8:11 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
The first two examples don't belong to an array:

Your example is var state = [[],[],[],[]] but it would probably need to read var state = myArray[[],[],[],[]];

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 11th, 2007, 8:18 am 
Offline

Joined: April 14th, 2007, 4:06 pm
Posts: 6
Yes I mentioned that towards the end, it should actually be instantiating an array... It does in every other language.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: June 11th, 2007, 8:27 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Yes, but OS won't understand that.

Here's a silly little multidimensional array example in OS.

var myArray = new Array(0,0)
myArray[1,1] = 5
myArray[2,5] = 9
Debug.trace(myArray[1,1]*myArray[2,5])

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 11th, 2007, 9:01 am 
Offline

Joined: April 14th, 2007, 4:06 pm
Posts: 6
OK, I'll see how I go replacing variables. Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group