🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1211

Re: Scientists as Programmers (was Re: Small Language Wanted)

#1211
From: D. Scott Bigham
Date: Wed, 16 Sep 1992 04:15
33 lines
2158 bytes
From the Holy Book of <1992Sep16.014635.27449@nntpd.lkg.dec.com>
  as spake by diamond@jit.dec.com (Norman Diamond) :
>Yeah, and Mr. Bigham tried to trick me into posting to comp.lang.c (without
>warning), so I've added comp.lang.c back in for Mr. Bigham.

Trick?  My dear sir, that's where I _found_ the article I was replying
to!  Follow-ups re-redirected for your peace of mind. :)

>OK, I can find in ANSI 3.2.1.5, page 36 lines 17 to 18, "and yield result
>types in a similar way.  The purpose is to yield a common type, which is
>also the type of the result."

However (I take you to mean), if the product overflows the type of the
result, we experience the dreaded Undefined Behavior and the compiler is
free to do anything it wants, including changing the type of the result
to accommodate the value of the product.  Okay, fair enough.

>Sounds like it agrees with the standard.  Sometimes the result [of cast
>to int] is defined by the standard, the rest of the time the result is
>defined by the implementation, and the result is never undefined.

A fine distinction, and one I'm not certain I understand.  Is the
implementation required, for instance, to inform the programmer how it
will behave in an "implementation-defined" situation?  Is the
implementation free to define that overflow in expressions causes your
computer to turn into an alligator?

						-sbigham
-- 
Scott Bigham                   | The opinions expressed above are
dsb@romeo.cs.duke.edu          | (c) 1992 Hacker Ltd. and cannot be
bigham@hercules.acpub.duke.edu | copied or distributed without a
    (but not for long)         | Darn Good Reason(tm).
Technical Details
Message-ID: <716616917@romeo.cs.duke.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!concert!duke!dsb
References: <a_rubin.716225408@dn66 <1992Sep12.16491 <1992Sep16.014635.27449@nntpd.lkg.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!concert!duke!dsb
From: dsb@duke.cs.duke.edu (D. Scott Bigham)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
Message-ID: <716616917@romeo.cs.duke.edu>
Date: 16 Sep 92 04:15:18 GMT
References: <a_rubin.716225408@dn66  <1992Sep12.16491 <1992Sep16.014635.27449@nntpd.lkg.dec.com>
Followup-To: comp.std.c
Organization: n. Arrangement in an orderly or logical fashion.  See "miracle".
Lines: 33