| 1234567891011121314151617181920212223 |
- MODULE BMix;
- (* Init body in an earlier module + procedure-owning module with its
- own init later: the early init must not steal the procedure's
- proc-table slot (regression: A.x read 0, C.cnt read 15). *)
- MODULE A EXPORT x;
- VAR x : INTEGER;
- BEGIN
- x := 1
- END A;
- MODULE C EXPORT cnt, Inc;
- VAR cnt : INTEGER;
- PROCEDURE Inc;
- BEGIN
- cnt := cnt + 5
- END Inc;
- BEGIN
- Inc();
- C.Inc()
- END C;
- VAR ExitCode : INTEGER;
- BEGIN
- ExitCode := A.x * 100 + C.cnt
- END BMix.
|