Sunday, March 11, 2012

2d Array

hi i need some help can someone say me how to make a 2d Array in a Formula Field ?To create and initialize an array variable in Basic syntax.

In Crystal syntax, you can use the square bracket notation for arrays instead.

Example
The following example is applicable to Basic syntax:

The following sets up an array of days for a week, starting with Monday:

Dim week, firstDay, lastDay

week = Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", _

"Saturday", "Sunday")

Rem firstDay contains "Monday"

firstDay = week(1)

Rem lastDay contains "Sunday"

lastDay = week(7)

formula = firstDay

Returns "Monday".|||I'm not sure that answers the 2D array question...

A workaround is to create a single dimensional array with x*y elements. e.g.
multi [3] [6]
single [3 * 6]
multi [x] [y] = single[6*(x-1) + y]

No comments:

Post a Comment