Xref: utzoo comp.os.vms:13833 comp.lang.pascal:1754 Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!ames!purdue!iuvax!bsu-cs!mithomas From: mithomas@bsu-cs.bsu.edu (Michael Thomas Niehaus) Newsgroups: comp.os.vms,comp.lang.pascal Subject: Re: VAX Pascal writeln on real numbers Keywords: pascal writeln rounding Message-ID: <6953@bsu-cs.bsu.edu> Date: 26 Apr 89 23:25:52 GMT References: <2744@cps3xx.UUCP> Organization: CS Dept, Ball St U, Muncie, IN, USA Lines: 22 In article <2744@cps3xx.UUCP>, rang@cpsin3.cps.msu.edu (Anton Rang) writes: > I noticed that the rounding on small numbers done by writeln on VAX > Pascal has a counter-intuitive (to me) result: > > writeln(-0.000001:6:4); > > ==> "0.0000" It's been a while since I have tried anything like this, but it seems to me that Pascal cannot display the sign since the field is not wide enough. What you happen if you would try to display the same thing using a field that was 7 characters wide, still with 4 decimal places? I'd try it myself but I am using our UNIX system right now and soon I need to log onto our IBM 3083 to work on a COBOL project (bleh). -Michael -- Michael Niehaus UUCP: !{iuvax,pur-ee}!bsu-cs!mithomas Apple Student Rep ARPA: mithomas@bsu-cs.bsu.edu Ball State University AppleLink: ST0374 (from UUCP: st0374@applelink.apple.com)