| 1234567891011121314151617181920212223 |
- MODULE TWith;
- // WITH incl. multi-designator shadowing and nesting. Exit 114.
- TYPE Point = RECORD x, y : INTEGER END;
- VAR ExitCode : INTEGER;
- VAR p, q : Point;
- BEGIN
- p.x := 5; p.y := 6;
- WITH p DO
- x := x + 1;
- y := x + y
- END;
- WITH p, q DO
- x := 1;
- y := 2
- END;
- WITH p DO
- WITH q DO
- x := 100
- END;
- y := x
- END;
- ExitCode := p.x + p.y + q.x + q.y
- END TWith.
|