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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e5c102037393131 X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Assertions Date: 1999/05/12 Message-ID: <3739E888.2DC68FC0@pwfl.com>#1/1 X-Deja-AN: 477150840 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <3736D243.1EEBF1AB@globalnet.co.uk> <3736F549.E3DDCDEB@pwfl.com> <7h83lc$rd$1@nnrp1.deja.com> <3739CECA.6A49865B@averstar.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1999-05-12T00:00:00+00:00 List-Id: Tucker Taft wrote: > > In any case, here is a strawman: > > pragma Assert(boolean_expression [, string_expression]); > > I can imagine that there are any number of issues which might make it difficult to write a rigorous definition for the pragma. That said, I still don't think this is sufficient reason to leave it out of a future standard. If a large number of compilers are including the pragma anyway, then inclusion in the standard will at least mean *some* level of safety as to what the feature means/does. (Wait a minute! That sounds suspiciously like the argument for legalizing drugs: "Well kids are going to do it anyway, so at least this way we can make sure they are getting 'healthy' drugs!" I'm not so sure I like being on this side of the argument! :-) Where there are going to be difficult issues, there are always the weasel words "Implementation Defined". Side effects of the boolean expression? Implementation Defined! At least you'll have common syntax and chances are that whatever semantic differences exist in theory, in practice they will likely be "corner cases" or simply uncommon. (I've seen endless discussion of parameter passing rules, for example, yet never once encountered a situation in real-world code where it caused a problem. Either the code never got ported to a different compiler where behavior was different or, if it did get ported, the code was structured in such a way as to not rely on the obscure side-effects. Is the expression "a tempest in a teapot" relevant here?) Anyway - I think your definition is fine, as long as the appropriate "Implementation Defined" weasel words are thrown in when the objections come up. MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 ***To reply, remove "bogon" from the domain name.*** Visit my web page at: http://www.flipag.net/mcondic