gap04_fwd_const_bound.mod 352 B

123456789
  1. MODULE Gap04FwdConstBound;
  2. (* NOT legal Modula-2: a VAR array bound names `n` before its CONST
  3. declaration. Declaration before use is required; V3 correctly
  4. rejects it. Class: decl-order (gm2 leniency).
  5. Corpus: setconst3.
  6. V3: undeclared identifier. *)
  7. VAR a : ARRAY [0..n] OF INTEGER;
  8. CONST n = 3;
  9. BEGIN a[0] := 0 END Gap04FwdConstBound.