t_fwdtype.mod 297 B

12345678910
  1. MODULE tfwdtype;
  2. // Module-level forward type reference: a global whose type is declared
  3. // further down (emission deferred until the TYPE completes).
  4. VAR g : Later;
  5. TYPE Later = RECORD x, y : INTEGER END;
  6. VAR ExitCode : INTEGER;
  7. BEGIN
  8. g.x := 40; g.y := 2;
  9. ExitCode := g.x + g.y
  10. END tfwdtype.