Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!rpi!sci.ccny.cuny.edu!phri!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Style guides and portability Message-ID: <14864@smoke.brl.mil> Date: 15 Jan 91 22:06:07 GMT References: <1991Jan13.182655.17672@athena.mit.edu> <1291@mti.mti.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 23 In article <1291@mti.mti.com> adrian@mti.UUCP (Adrian McCarthy) writes: >Who cares how many bits are used in the representation? What really matters >is the range of legal values. That's what I was referring to. I used the shorthand terminology for brevity, on the assumption that everyone who cared would understand the abbreviation. >Yes, use limits.h. But does "pure binary numeration system" imply that >you can't make an ANSI-compliant C compiler for a BCD machine? doesn't necessarily exist in non-ANSI C environments, which many of us still have to contend with. However, the guaranteed minimum sizes apply whether or not is #included. Certainly one could produce a conforming implementation on an inherently BCD machine; however, care would have to be taken to ensure that bitwise operations and unsigned arithmetic were properly implemented. There is no requirement that (for example) fully describe hardware representation capabilities, merely the ranges officially constituting the conforming implementation of the C standard. Any application that attempted to exploit values outside the official range would be non- strictly conforming.