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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.germany.com!feeder.erje.net!newsfeed.velia.net!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 02 Oct 2008 16:35:39 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: On pragma Precondition and types Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Message-ID: <48e4dc3b$0$6604$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 02 Oct 2008 16:35:40 CEST NNTP-Posting-Host: 8c41c0cf.newsspool3.arcor-online.net X-Trace: DXC=QgoOGKXXY=oBa?RK42nc\616M64>:Lh>_cHTX3j=>f?>nQYWQX9 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2194 Date: 2008-10-02T16:35:40+02:00 List-Id: Suppose there is a type T with operations P and F, type T is private; procedure P (X: in out T); function F (X: T) return Boolean; I want to add a precondition of P. The precondition involves F, procedure P (X: in out T); pragma Precondition (F(X)); function F (X: T) return Boolean; But when the compiler sees the pragma Precondition, it has not yet seen F. Therefore, by the principle of linear reading, the precondition cannot be compiled, IIUC. Could there be a rule for pragmas, say, allowing forward references? Or can these rules be tied to some suitable constraint syntax?