Debian Codegraph @

gcc/testsuite/gm2/link/pimc/pass/testlibc2.mod

raw
1 (* testlibc2 test for the presence of printf and the ability to pass varargs. *)
2
3 MODULE testlibc2 ;
4
5 FROM libc IMPORT printf ;
6
7 VAR
8 i: INTEGER ;
9 r: REAL ;
10 BEGIN
11 printf ("hello world\n");
12 i := 12 ;
13 printf ("int value of 12 = %d\n", i);
14 r := 3.14159 ; (* REAL is a double. *)
15 printf ("REAL approx of pi = %g\n", r);
16 END testlibc2.