Page 1 of 1

Posted: Wed Sep 04, 2002 3:02 pm
by BackupUser
Restored from previous forum. Originally posted by pantera.

This may be a stupid question but...
How do i declare a multidimensional array in a struct?

Something like putting a line like this:

Code: Select all

Dim a.w(10,10)

into:

Code: Select all

Structure whatever  a.w[10] ;This a.w[10][10] nor this a.w[10,10] compiles
EndStructure
The compiler doesn't mind putting the Dim line into the struct but accessing it afterwards....impossible.

Posted: Wed Sep 04, 2002 5:11 pm
by BackupUser
Restored from previous forum. Originally posted by freak.

I don't think that is possible (the Docs only talk about singledimensional arrays inside
Structures.

But you could do it like this:

Code: Select all

Structure array
  b.w[10]
EndStructure

Structure whatever
  a.array[10]
EndStructure

var.whatever
var\a[1]\b[5] = 1   ; instead of var\a[1,5] which doesn't work
Hope this helps...

Timo

Posted: Wed Sep 04, 2002 10:21 pm
by BackupUser
Restored from previous forum. Originally posted by pantera.

Well....It was a solution like that i wanted to avoid. :)
Thank you anyway.

Have to do it in another way then...i hope the language supports double pointers. Have to hit the reference manual once again.