home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
m
/
mod2tutr.zip
/
EXAMPLES.ZIP
/
CH03E2.MOD
< prev
next >
Wrap
Text File
|
1989-01-18
|
549b
|
30 lines
(* Chapter 3 - Programming exercise 2 *)
MODULE CH03E2;
FROM InOut IMPORT WriteString, WriteLn;
VAR CardNumber : CARDINAL;
IntNumber : INTEGER;
CharValue : CHAR;
BEGIN
IntNumber := -1;
CardNumber := IntNumber; (* Execution error *)
CharValue := 'A';
CardNumber := CharValue; (* Compile error *)
END CH03E2.
(* Result of execution
(The programs contains errors. It will not compile or execute.)
(Remove the compile errors to see the executable errors.)
*)