Subroutine GENERICINDEX

Returns the external index of a generic entity for the given internal index and the number of generic entities present in variable numgenerics. If a given internalid input value does correspond to any existing generic entity then a zeroexternalid value is returned.

The genericindex subroutine is used in conjunction with the generic subroutine, which returns attributes associated with the generic entity and with the external label externalid.

This subroutine is particularly useful to perform loops over generic entities. For example, when you want to retrieve the number of generic entities by calling the subroutine genericindex(0,externalid,numgenerics), then you can loop variable i from 1 to numgenerics and retrieve the external index of the generic index externalid by calling the subroutine genericindex(i,externalid,numgenerics). Knowing the external generic index externalid allows one to get generic properties and attributes through generic subroutine.

Calling convention:

call genericindex(internalid,externalid,numgenerics)
Arguments Data type Input/Output Description
internalid Integer Call Internal index of a generic entity.
externalid Integer Return External index of a generic entity.
numgenerics Integer Return Number of generic entities.