dc_points[N, 1, 2]
N represents an unknown number of elements. PB will only let me declare the
array with known values.
Does anyone have any suggestions??
Thanks
Julie Hill
I assume you only need one dimension of the array to be dynamic And that you can
inverse the dimensions from [N, 1, 2] to [1, 2, N]
Create a structure with one element, e.g.
n[] decimal 1
That's a structure with one decimal dynamic array variable.
// Simulates a 3D array (5, 10, N)
s_points lstr_points[5, 10]
lstr_points[1, 1].N[1] = 1.1
lstr_points[1, 1].N[2] = 1.2
lstr_points[1, 1].N[3] = 1.3
MessageBox("1", lstr_points[1, 1].N[1])
MessageBox("2", lstr_points[1, 1].N[2])
MessageBox("3", lstr_points[1, 1].N[3])
Michael
On Fri, 20 Aug 1999 11:23:59 -0600,
in powersoft.public.powerbuilder.general
Create a structure with one element, e.g.
n[1, 2] decimal 1
That's a structure with a 2D decimal array variable.
// Simulates a 3D array (N, 1, 2)
s_points lstr_points[]
lstr_points[1].N[1, 1] = 1.1
lstr_points[1].N[1, 2] = 1.2
lstr_points[2].N[1, 1] = 2.1
lstr_points[2].N[1, 2] = 2.2
MessageBox("(1, 1, 1)", lstr_points[1].N[1, 1])
MessageBox("(1, 1, 2)", lstr_points[1].N[1, 2])
MessageBox("(2, 1, 1)", lstr_points[2].N[1, 1])
MessageBox("(2, 1, 2)", lstr_points[2].N[1, 2])
Michael
On Fri, 20 Aug 1999 13:42:14 -0400,
in powersoft.public.powerbuilder.general
dim1 number
dim2 number
dim3 number
value number??
Then, when you need the value, you can do something like
GetItemNumber (Find ("dim1=" +String (li_Dim1)+ " and dim2=" +String
(li_Dim2)+ " and dim3=" + String (li_Dim3), 1, RowCount ()), "value")
... with error checking on the Find(), of course.
Good luck,
Terry [TeamSybase] and Sequel the techno-kitten
On Fri, 20 Aug 1999 11:23:59 -0600, "Julie Hill" <julie...@gte.net>