Documentation
An object of this type provides the ability to store values and objects in a way which can be managed using traditional set operations
The value of an object of type set is undefined and it is an error to attempt to get or to set it.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| duplicates | "allow" | string | Specifies how the new set will respond to attempts to add more than one copy of a value or object to it. If set to "allow" then more than one copy of a value or object can be stored, and a count of how many copies there are is retained. If set to "ignore" then an attempt to add a second or subseqent copy of a value or object is ignored, with the count of the number of copies of that element being kept at one. If set to "prevent" it is an error to attempt to add a second or subsequent copy of a value or object to the set. |
| Property | Type | Description |
|---|---|---|
| duplicates | string | Specifies how the set responds to attempts to add more than one copy of a value or object to it. If set to "allow" then more than one copy of a value or object can be stored, and a count of how many copies there are is retained. If set to "ignore" then an attempt to add a second or subseqent copy of a value or object is ignored, with the count of the number of copies of that element being kept at one. If set to "prevent" it is an error to attempt to add a second or subsequent copy of a value or object to the set. |
| type | type | Specifies the set type object. |
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| object | None | type(*) | This is the object to be added to the set. |
| count | 1 | integer | The number of copies of the object to add to the set. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
setvar.addvalue (
integer|string|blob|boolean|number ,
integer value,
integer count )
error
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| value | None | integer|string|blob|boolean|number |
This is the value to be added to the set. The values .nul
and .inf are also permitted.
|
| count | 1 | integer | The number of copies of the value to add to the set. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
Establishes the difference between the set for which the method is called and the set passed as an argument. The set for which the method is called will then contain only elements (and copies of elements) which previously had been in one set but not both. The set itself is returned.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| set | None | set | The set that is to be differenced with the set for which the method is called. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
Intersects the set with a set passed as an argument. The set for which the method is called will then only contain elements (and copies of elements) that are found in both sets. The set itself is returned.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| set | None | set | The set that is to be intersected with the set for which the method is called. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
Returns the number of copies of a specified object in the set. If the object
is not in the set then 0 is returned.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| object | None | type(*) | This is the object to be removed from the set. |
| count | 1 | integer | The number of copies of the object to be removed from the set. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
setvar.removevalue (
integer|string|blob|boolean|number ,
integer value,
integer count )
error
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| value | None | integer|string|blob|boolean|number |
This is the value to be removed from the set. The values
.nul and .inf are also
permitted.
|
| count | 1 | integer | The number of copies of the value to be removed from the set. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
Subtracts a set passed as an argument from the set for which the method is called. The set for which the method is called will then contain only elements (and copies of elements) which were in the set before calling the method, but were not in the set passed as an argument. The set itself is returned.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| set | None | set | The the set that is to be subtracted from the set for which the method is called. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| set | None | set | The set that is to be united with the set for which the method is called. |
| error | .nul | integer |
Specifies an object that is used to output any error code generated during the
execution of the method. This parameter must be an object, not an
integer value. If error
is not specified or is .nul then any error
that occurs during execution will halt the program. If an error
object is specified and an error occurs during execution then the
error code is output into that object.
|
Returns the number of copies of a specified value in the set. If the value is
not in the set then 0 is returned.



