C3DFile.GetParNoOfDimensions

Previous  Next

 

nNoOfDim = C3DFile.GetParNoOfDimensions( BYVAL nFile      AS INTEGER, 

                                         BYVAL strParName AS STRING ) AS INTEGER

 


 

Returns the number of dimensions of a parameter.  This is similar to the maximum number of dimensions an array in MyBASIC2

can have except that MyBASIC2 currently only supports up to 4 dimensions (indices) while C3D supports up to 7.

 

Example:

 

' Print out the dimension of a parameter type string

 

DIM i AS INTEGER

DIM j AS INTEGER

 

j = C3DFile.GetParNoOfDimensions( nFile, "POINT:LABELS" )

PRINT "POINT:LABELS( ";

 

FOR i = 1 TO j

  IF i > 1 THEN

     PRINT ", ";

  ENDIF

 

  ' We're using OPTION BASE 0 so the nDimension param needs to offset 0

 

  PRINT C3DFile.GetParDimension( nFile, "POINT:LABELS", i-1 );

ENDFOR