getvaluetype
getvaluetype |
Purpose
Query the type of the value(s) that can be stored in an entity
Synopsis
function xreflect~getvaluetype(entityname:string):string
Argument
entityname
|
The name of the public entity to query
|
Return value
|
The value type, equal to one of the following constants:
|
Example
The following:
public declarations myvar: string, myarr: array(range) of real end-declarations writeln('myvar=',getvaluetype('myvar')) writeln('myarr=',getvaluetype('myarr'))
produces this output:
myvar=string myarr=real
Further information
1. The
value type of an entity is the type of the values it can contain. For example, the value type of an
array of integer is
XREFLECT_TYP_INT.
2. If the specified entity name cannot be found, the function will return
XREFLECT_NOT_FOUND.
Related topics