File: test4d.mod

package info (click to toggle)
m2c 0.6-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,096 kB
  • ctags: 1,907
  • sloc: ansic: 18,088; sh: 168; makefile: 60
file content (19 lines) | stat: -rw-r--r-- 402 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(* p.136 1t-2t *)

(* Declarations and scope rules *)

(* If an identifier x defined by a declaration D1 is used in   *)
(*   another declaration ( not statement ) D2, then D1 must    *)
(*   textually precede D2.                                     *)

(* B was defined before A *)

 MODULE test4d;
  CONST
       B=A+3;
       C=20;
       A=0;
  VAR D:CARDINAL;
  BEGIN
   D:=(A+B)*C;
  END test4d.