From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:44cd:: with SMTP id r196mr17367765qka.90.1642505759275; Tue, 18 Jan 2022 03:35:59 -0800 (PST) X-Received: by 2002:a25:6d06:: with SMTP id i6mr31477116ybc.216.1642505759169; Tue, 18 Jan 2022 03:35:59 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 18 Jan 2022 03:35:58 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=80.194.57.154; posting-account=xS3LTwoAAAB3aeXopC8a-M58TGE8K6go NNTP-Posting-Host: 80.194.57.154 References: <09dcb07d-f7b8-432b-8338-840ff90faef1n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Odd Behaviour From: Mark Wilson Injection-Date: Tue, 18 Jan 2022 11:35:59 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63386 List-Id: On Tuesday, January 18, 2022 at 11:28:41 AM UTC, Jeffrey R.Carter wrote: > On 2022-01-18 12:05, Mark Wilson wrote: > > > > Pre => (if HandleType = SQL_HANDLE_ENV then > > InputHandle = SQL_NULL_HANDLE > > else > > InputHandle /= SQL_NULL_HANDLE), > > Post => (if SQL_OK (Result) then > > OutputHandlePtr /= SQL_NULL_HANDLE > > else > > OutputHandlePtr = SQL_NULL_HANDLE); > What happens with > > Pre => (Handletype = SQL_Handle_Env) = (Inputhandle = SQL_Null_Handle) > > and > > Post => SQL_OK (Result) = (Outputhandleptr /= SQL_Null_Handle) > > which seem to be equivalent? > > -- > Jeff Carter > "Monsieur Arthur King, who has the brain of a duck, you know." > Monty Python & the Holy Grail > 09 It fails (same warning) with only, Pre => (Handletype = SQL_Handle_Env); Guess you can't have Pre or Post with Valued_Procedures. A warning is suppressed that mentions that these are supported, yet, pragma Warnings (Off, "*not yet supported*"); But that warning is only issued on Spark Analysis, not on the main Ada compile. Hrmph. No problem to abstract away - so not a show killer - ie hide an Ada stub in the body, and leave the Spark annotations in the spec so we won't need to use Valued_Procedures. Functions in Spark can't have in out parameters, of course.