Is it possible to use a two dimensional array in a formula? The only examples I have run across use one dimensional arrays.
Announcement
Collapse
No announcement yet.
Array Question
Collapse
This topic is closed.
X
X
-
Hello pa-kay,
Yes you can use multidimensional arrays.
PHP Code:var aArray = new Array(2);
for (i = 0; i < 2; ++i) {
aArray[i] = new Array(10);
}
Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
-
Full support of the Core objects in JavaScript 1.5 are included in EFS. Below is an example from Netscape's Core JavaScript Reference site.
---------------
Example 2: Two-dimensional array. The following code creates a two-dimensional array and assigns the results to myVar.
PHP Code:myVar="Multidimensional array test; "
a = new Array(4)
for (i=0; i < 4; i++) {
a[i] = new Array(4)
for (j=0; j < 4; j++) {
a[i][j] = "["+i+","+j+"]"
}
}
for (i=0; i < 4; i++) {
str = "Row "+i+":"
for (j=0; j < 4; j++) {
str += a[i][j]
}
myVar += str +"; "
}
Multidimensional array test;
Row 0:[0,0][0,1][0,2][0,3];
Row 1:[1,0][1,1][1,2][1,3];
Row 2:[2,0][2,1][2,2][2,3];
Row 3:[3,0][3,1][3,2][3,3];Regards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
Comment