Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!bu-cs!budd From: budd@bu-cs.UUCP (Philip Budne) Newsgroups: net.lang.pascal Subject: SUN pascal Message-ID: <557@bu-cs.UUCP> Date: Mon, 5-May-86 18:39:38 EDT Article-I.D.: bu-cs.557 Posted: Mon May 5 18:39:38 1986 Date-Received: Thu, 8-May-86 07:06:33 EDT Organization: Boston Univ Comp. Sci. Lines: 46 Transposrting some pascal code from a BSD4.2 system to a SUN3.0 system I ran into some range check problems. The first would appear to be an actual error (in the ISO defintion), and the other a SUN pascal bug. ----- program q(input,output); var a : 0 .. 100; i : integer; begin i := 0; for a := 0 to i-1 do writeln(output, a); end. ----- program z; var c : char; i : -128 .. 127; begin i := 10; c := chr( i ); end. ----- For more entertainment I tried the same programs under TOPS-20/Rutgers and VMS v4 pascal: q z TOPS err ok SUN err err BSD ok ok VMS ok ok The range violation in Z clearly a SUN bug, but Q would appear to be implementation dependant, it all depends on when you perform the range check (and if you check the loop limits before you start). Phil Budne / Boston University / Distributed Systems