home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky sci.math:11248 comp.lang.misc:3016 comp.lang.fortran:3513 comp.std.c:2603 comp.lang.c:13488
- Newsgroups: sci.math,comp.lang.misc,comp.lang.fortran,comp.std.c,comp.lang.c
- Path: sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond
- From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
- Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
- Message-ID: <1992Sep11.012559.17662@nntpd.lkg.dec.com>
- Sender: usenet@nntpd.lkg.dec.com (USENET News System)
- Reply-To: diamond@jit.dec.com (Norman Diamond)
- Organization: Digital Equipment Corporation Japan , Tokyo
- References: <92Sep1.205116edt.669@neuron.ai.toronto.edu> <1992Sep4.162938.29237@dscomsf.desy.de> <Bu2r42.5xr@mentor.cc.purdue.edu> <id.I12T.GP4@ferranti.com> <a_rubin.716152347@dn66>
- Date: Fri, 11 Sep 1992 01:25:59 GMT
- Lines: 26
-
- In article <a_rubin.716152347@dn66> a_rubin@dsg4.dse.beckman.com (Arthur Rubin) writes:
- >In <id.I12T.GP4@ferranti.com> peter@ferranti.com (peter da silva) writes:
- >>In article <Bu2r42.5xr@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
- >>>[nxn -> 2n multiplication]
- >> int a, b; long c;
- >> c = a * b;
- >(peter commented further that this works on a PDP-11).
- >Aside from there being no guarantee that "long" is longer than "int",
-
- True, and even if it is, there is no reason that it has to work. If anyone
- wants to pay me for it, I could write a C implementation for PDP-11(TM)
- non-computers in which the above doesn't work.
-
- >I don't think it is LEGAL for ANSI C to do this, although, I, also have seen
- >it work in some C implementations.
-
- ANSI C leaves the result of overflow undefined. But I think the standard
- could pretty well define whatever it wanted without breaking higher laws.
-
- ANSI conforming IMPLEMENTATIONS are allowed to do it because, when the
- standard doesn't define the result, the implementations can do whatever
- they want.
- --
- Norman Diamond diamond@jit081.enet.dec.com
- If this were the company's opinion, I wouldn't be allowed to post it.
- "Yeah -- bad wiring. That was probably it. Very bad."
-