How to initialize and 2D Array of Structures?

If i have a structure ‘Point’ that is three single values (X,Y,Z)
Can I use an Array Statement to initialize an array of ‘Point’?

Here’s a mildly interesting implementation. Module contains:

Structure RealPointStruct
  X as Integer
  Y as Integer
  Z as Integer
End Structure
Public Function toStruct(X as Integer, Y as Integer, Z as Integer) As RealPointStruct
  var result as RealPointStruct
  result.X = X
  result.Y = y
  result.Z = Z
  return result
End Function

Usage as:

var Points() as RealPointStruct = Array( toStruct( 0, 1, 2 ) )
2 Likes