C3DFile.GetParType

Previous  Next

 

nParType = C3DFile.GetParType( BYVAL nFile        AS INTEGER,

                               BYVAL strParName   AS STRING ) AS INTEGER

 


 

Returns the parameter type as an INTEGER.  The types have been defined in C3D.bis and can be one of following:

 

CONST C3D_CHAR                   = -1

CONST C3D_STRING                 = -1

CONST C3D_BYTE                   = 1

CONST C3D_WORD                   = 2

CONST C3D_INTEGER                = 2

CONST C3D_REAL                   = 4

 

Note;  The CHAR and STRING as well as WORD and INTEGER are the same and can be used interchangeable.

 

Example:

 

' Print the names and types of all parameters in file

 

DIM i AS INTEGER

DIM strName AS STRING

 

PRINT "- List of Parameters ---------------------------------",

 

i = 1

 

DO

  strName = C3DFile.GetParName( nFile, i, TRUE )

  IF strName <> "" THEN

     PRINT "   > ";strName;" (Type ";C3DFile.GetParType( nFile, strName );")",

     i = i + 1

  ENDIF

UNTIL strName = ""

 

PRINT "------------------------------------------------------",