Initializing help system before first use

getstructtype

getstructtype


Purpose
Query the structural type of an entity
Synopsis
function xreflect~getstructtype(entityname:string):string
Argument
entityname 
The name of the public entity to query
Return value
 
The structure type, equal to one of the following constants:
XREFLECT_STR_ARR 
array
XREFLECT_STR_CONST 
scalar constant
XREFLECT_STR_REF 
scalar variable
XREFLECT_STR_SET 
set
XREFLECT_STR_UNSUPPORTED 
a structural type not supported by xreflect
XREFLECT_NOT_FOUND 
entityname was not found in the dictionary
Example
The following:
public declarations
  myvar: string,
  myarr: array(range) of real
end-declarations
writeln('myvar=',getstructtype('myvar'))
writeln('myarr=',getstructtype('myarr'))
produces this output:
myvar=variable
myarr=array
Further information
1. The structural type of an entity defines how it structure(s) the values it stores. For example, the structural type of an array of integer is XREFLECT_STR_ARR.
2. If the specified entity name cannot be found, the function will return XREFLECT_NOT_FOUND.
Related topics