RosettaCodeData/Task/Scope-modifiers/Oberon-07/scope-modifiers-1.oberon
2026-04-30 12:34:36 -04:00

16 lines
523 B
Text

MODULE D1;
VAR x* : INTEGER (* x is visible (read-only) in other modules *)
y, z : BOOLEAN; (* y and z are not visible to other modules *)
PROCEDURE P1*; (* P1 can be called from other modules *)
VAR lv1, lv2 : INTEGER;
PROCEDURE Sub1;
BEGIN (* Sub1 body *)
(* lv1, lv2 not visible here *)
END Sub1;
BEGIN (* P1 body *)
(* x, y, z, lv1, lv2 and Sub1 visible here *)
END P1;
BEGIN (* D1 body *)
(* x, y, z and P1 visible here *)
END D1.