| 123456789101112131415 |
- MODULE Showcase5;
- (* Step-5 tour: FROM-imported var/proc/type, qualified var/call/const,
- exported record type, implementation init body. ExitCode = 46:
- init total=3; Add(10) -> 13; total=13+1+2=16;
- Get()=16+7=23; ExitCode=16+23+7=46. *)
- FROM S5Lib IMPORT total, Add, Pair;
- IMPORT S5Lib;
- VAR ExitCode : INTEGER;
- p : Pair;
- BEGIN
- Add(10);
- p.a := 1; p.b := 2;
- total := total + p.a + p.b;
- ExitCode := total + S5Lib.Get() + S5Lib.unit
- END Showcase5.
|