From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,90f687f65a66617e X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Simple ADA/C Question Date: 1997/03/07 Message-ID: #1/1 X-Deja-AN: 223845491 Distribution: world References: Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-03-07T00:00:00+00:00 List-Id: In article 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