File: test4e.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 (23 lines) | stat: -rw-r--r-- 506 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
20
21
22
23
(* p.136 3t-4t *)

(* Declarations and scope rules *)

(* A type T1 can be used in a declaration of pointer type  T     *)
(*   (see 6.7) which textually precedes the declaration of T1,   *)
(*   if both T and T1 are declared in the same block.            *)

(* types PX and X are defined in different blocks *)

 MODULE test4e;
  PROCEDURE FUNCT;
   TYPE
       PX= POINTER TO X;
   VAR
       VPX:PX;
   BEGIN
    VPX:=NIL;
   END FUNCT;
  TYPE X= ARRAY [1..20] OF REAL;
  BEGIN
   FUNCT;
  END test4e.