--File IntSetsDefs.mesa
--Management of ordered sets in VM
--Last changed: June 19, 1980 2:08 PM
DIRECTORY
IntStorageDefs: FROM "IntStorageDefs" USING [ObjectName];
IntSetsDefs: DEFINITIONS =
BEGIN OPEN IntStorageDefs;
InsertSet: PUBLIC PROCEDURE [set: ObjectName, value: LONG CARDINAL]
RETURNS [newset: ObjectName];
-- Insert value into set
StripSet: PUBLIC PROCEDURE [set: ObjectName, n: LONG CARDINAL]
RETURNS [newset: ObjectName];
-- Destroy all elements having .contents >= n
FreeSet: PUBLIC PROCEDURE [set: ObjectName];
-- Destroy entire set
EnumerateSet: PUBLIC PROCEDURE [set: ObjectName,
proc: PROCEDURE[ObjectName,LONG CARDINAL] RETURNS[BOOLEAN]]
RETURNS [ObjectName];
-- Emunerate all elements of set until proc returns TRUE or none left
-- Returns last object or NilObjectName
InSet: PUBLIC PROCEDURE [set: ObjectName, value: LONG CARDINAL]
RETURNS [BOOLEAN];
-- Determine if value is in set
RemoveFromSet: PUBLIC PROCEDURE [set: ObjectName, value: LONG CARDINAL]
RETURNS [newset: ObjectName];
-- Remove element having contents=value from set
PrintSet: PUBLIC PROCEDURE [set: ObjectName, string: STRING];
-- Convert and concatenate all .contents into given string
END.