comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Simple ADA/C Question
Date: 1997/03/07
Date: 1997-03-07T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Mar7135754@alexandria> (raw)
In-Reply-To: Pine.LNX.3.95.970225100418.10492A-100000@vf700f.msfc.nasa.gov


In article <dewar.857703307@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

> Jon said
> 
> <<> Less writing, and guaranteed to not merely give a warning, but to be
> > illegal if the assumption is violated is:
> 
> You at compile time - surely at runtime (assuming no pragma supress or
> some such) this will raise CE if violated.
> 
> >
> >    X : Integer := 1 / Boolean'Pos (Interfaces.C.int'Size = Integer'Size);
> 
> OK.  But it is significantly less clear as well.>>
> 
> Robert replies. I am not sure what that sentence means, since it does not
> quite parse, but if you are saying that my statement may raise CE at run
> time, that is wrong, it is definitely staticaly illegal at compile time.

You're right it has at least one typo (insert "mean" after the first
"You") and even after that is fixed it is still unclear, because I
goofed up the contextual quotes as well.

What I meant to say was,

"You mean Keith's 'assertion' version won't give an error at compile
time - surely at runtime (assuming no pragma supress or some such)
this will raise CE if violated".


> As for it being unclear, of course a comment would clarify the intent,
> 
> something like:
> 
>     --  Cause illegality (division by zero) if int size /= integer size
> 
> and then I think it would be clear enough1

Perhaps, but now you have even more writing - not less.  And you can
always forget comments, "the road to Hell is paved with ..."

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





  parent reply	other threads:[~1997-03-07  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-25  0:00 Simple ADA/C Question root
1997-02-26  0:00 ` Bob Klungle
1997-02-26  0:00   ` root
1997-02-26  0:00     ` Robert Dewar
1997-02-28  0:00       ` Keith Thompson
1997-03-02  0:00         ` Robert Dewar
1997-03-04  0:00           ` Keith Thompson
1997-03-04  0:00             ` Robert Dewar
1997-03-04  0:00               ` John McCabe
1997-03-04  0:00                 ` Anders Eliasson
1997-03-04  0:00                 ` Robert Dewar
1997-03-06  0:00                   ` Keith Thompson
1997-03-06  0:00                     ` Larry Kilgallen
1997-03-09  0:00                       ` Robert Dewar
1997-03-06  0:00                     ` Robert Dewar
1997-02-26  0:00     ` Stephen Leake
1997-02-26  0:00       ` root
1997-02-26  0:00     ` John McCabe
1997-02-27  0:00 ` Robert Dewar
1997-02-27  0:00   ` root
1997-02-27  0:00   ` root
1997-03-03  0:00 ` Robert I. Eachus
1997-03-05  0:00   ` Robert Dewar
1997-03-05  0:00 ` Jon S Anthony
1997-03-06  0:00   ` Robert Dewar
1997-03-07  0:00 ` Jon S Anthony [this message]
1997-03-07  0:00   ` Robert Dewar
1997-03-08  0:00     ` Larry Kilgallen
1997-03-07  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox