GetItemType (ESL Extended Functions)

GetItemType (ESL Extended Functions)

%GetItemType function


Function

The function detects a type of entered column of the structure or structured variable.

Declaration

INT %GetItemType( HBJ in objRef, INT in col )

Parameters

objRef

An expression of the HBJ type - a reference to an object of Structured variable type or Structure definition.

col

Column index.

Description

The function gets back an invalid value:

  • if objRef is the reference to unknown object, or the object is not Structured variable type or Structure definition,

  • if the value of parameter col is out of range which is given by columns number of relevant object.

    Value type is expressed by an integer according to the following table:

     

    Column type

    Value

    Logical

    0

    Integral

    1

    Real

    2

    Absolute time

    3

    Relative time

    4

    Text

    5

    Object

    6

Example

RECORD (SD.Struct)_rec INT _itemType _itemType := %GetItemType(SD.Struct\HBJ, 1) _itemType := %GetItemType(SV.Struct\HBJ, 3) _itemType := %GetItemType(_rec\HBJ, 2)