Structure

The DEFINE command can be used to declare new complex data types consisting of named fields of various types.

 DEF[INE] STRUCTURE structure_name 
   field1_type         field1_name[(array_size)]
   ...
 ENDDEFINE

Once the 'define structure' command has been parsed, the named data type is available for use at any later time in the same EASI session. The fields may be intrinsic types such as 'char' or 'float', or may be 'String' or 'MString', or other complex structures defined using the DEFINE STRUCTURE command; however, structure fields may not be of type 'MVar'.

Note that an array size specifier should not be used if the field is of type String or MString.

Example:

Define a structure to hold information about a file, create a variable of the new type, and assign values to it.

 DEFINE STRUCTURE DatasetInfo
   char        Filename[128]

   char        Mapunits[24]
   double      ULX
   double      ULY
   double      LRX
   double      LRY

   int         HasRasterData
   int         HasVectorData
 ENDDEFINE


 LOCAL DatasetInfo    DSInfo

 DSInfo.Filename = file
 DSInfo.MapUnits = "LONG/LAT"
 DSInfo.ULX = 12.5
 DSInfo.ULY = 45.0
 DSInfo.LRX = 13.0
 DSInfo.LRY = 44.5
 DSInfo.HasRasterData = 0
 DSInfo.HasVectorData = 1

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.