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 X-Google-Thread: 103376,e91f674b5db5e2b2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-17 10:36:05 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!out.nntp.be!propagator-SanJose!news-in!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Assigning the value of a deferred constant? References: <7a2cqtcole1v0038jiorf4ncdant1fs3im@4ax.com> X-Newsreader: Tom's custom newsreader Message-ID: <9wqp7.16899$L%5.13832570@news1.rdc1.sfba.home.com> Date: Mon, 17 Sep 2001 17:36:05 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1000748165 24.7.82.199 (Mon, 17 Sep 2001 10:36:05 PDT) NNTP-Posting-Date: Mon, 17 Sep 2001 10:36:05 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:13130 Date: 2001-09-17T17:36:05+00:00 List-Id: >is posible or not in Ada. I seem to remember that Barnes' book You can't elaborate the body before you're done elaborating the spec, but you can elaborate a different package, including its body. Borrowing from Barnes p. 258 discussion of pragma Elaborate, package Early is function Is_Big_Endian return Boolean; end Early; package body Early is function Is_Big_Endian return Boolean is ... end Early; with Early; pragma Elaborate(Early); package Test is type Byte_Order is (Little_Endian, Big_Endian); Default_Byte_Order : constant Byte_Order; private Default_Byte_Order : constant Byte_Order := Byte_Order'val(Boolean'pos(Early.Is_Big_Endian)); end Test;