Initializing help system before first use

getsetelements

getsetelements


Purpose
Copy the elements from a specified set into a list of basicvalue
Synopsis
function xreflect~getsetelements( entityname:string ):list of xreflect~basicvalue
procedure xreflect~copysetelements( entityname:string, destlist:list of xreflect~basicvalue )
Arguments
fu
entityname 
The name of the public entity to access
destlist 
The list into which to copy the entities
Return value
A newly-created list containing each value from the specified entity, in basicvalue types
Example
The following:
public declarations
  myvar: set of integer,
end-declarations
myvar := {1,2,3}
writeln('myvar=',getsetelements('myvar'))
produces this output:
myvar=[1,2,3]
Further information
1. copysetelements is similar to getsetelements, but copies the values into an existing list rather than returning a new one.
2. If the specified entity name cannot be found, the model will terminate with a runtime error.
3. If the specified entity is not a set of a supported type, the model will terminate with a runtime error.
Related topics