Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!cernvax!ethz!ethz-inf!wyle From: wyle@inf.ethz.ch (Mitchell Wyle) Newsgroups: comp.lang.modula2 Subject: Re: WriteInt(-32768, n) Summary: sun does it right! Message-ID: <173@inf.ethz.ch> Date: 21 Apr 89 15:56:47 GMT References: <1007@psueea.UUCP> Reply-To: wyle@ethz.UUCP (Mitchell Wyle) Organization: Departement fuer Informatik, ETH Zuerich Lines: 33 In article <1007@psueea.UUCP> bartonr@psu-cs.cs.pdx.edu (Robert Barton) writes: > Consider the following simple program: > With my system (Modula-2/Amiga by TDI) I get the following output: > 8000H -4294934528 antares [tmp]203 cat >t.mod MODULE Test; FROM InOut IMPORT WriteHex, WriteInt, WriteLn; VAR int : INTEGER; BEGIN int := -32768; WriteHex(CARDINAL(int), 12); WriteInt(int, 12); WriteLn END Test. antares [tmp]204 make t m2c -sun3 -o t -e t t.mod antares [tmp]205 ./t FFFF8000 -32768 Looks ok to me. BTW: We run Sun OS 4.0.1 EXPORT Sun Modula-2 Compiler, Release 2.1, key S31.11 -Mitch -- -Mitchell F. Wyle wyle@ethz.uucp Institut fuer Informationssysteme wyle@inf.ethz.ch ETH Zentrum / 8092 Zurich, Switzerland +41 1 256 5237