The following program runs without any run-time errors or warnings. How to make it produce a (useful) run-time error? program prog; var a:1..5; begin a:=5; writeln(a); a:=a+1; {Here it should produce at least a warning} writeln(a); end. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Dan N wrote:
The following program runs without any run-time errors or warnings. How to make it produce a (useful) run-time error?
program prog; var a:1..5; begin a:=5; writeln(a); a:=a+1; {Here it should produce at least a warning} writeln(a); end.
Which GPC version do you use? Newer versions should produce a run-time error here. The latest snapshot is: http://www.math.uni.wroc.pl/~hebisch/gpc-20060325.tar.bz2 Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8
participants (2)
-
Dan N -
Frank Heckenbach