| 1234567891011 |
- MODULE TFwdSet;
- // SET OF a type declared later in the same TYPE block (forward type
- // reference): the span check is deferred until the block completes.
- // Exit 42.
- TYPE myset = SET OF colour;
- colour = (red, green, blue);
- VAR s : myset; ExitCode : INTEGER;
- BEGIN
- s := myset{red};
- IF (red IN s) AND NOT (green IN s) THEN ExitCode := 42 ELSE ExitCode := 1 END
- END TFwdSet.
|