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,9def0a9c238c7bd8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-11 20:27:53 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!xfer13.netnews.com!netnews.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A8764FF.CAE087E3@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 0x Wish List References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 12 Feb 2001 04:22:26 GMT NNTP-Posting-Host: 158.252.122.155 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 981951746 158.252.122.155 (Sun, 11 Feb 2001 20:22:26 PST) NNTP-Posting-Date: Sun, 11 Feb 2001 20:22:26 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: supernews.google.com comp.lang.ada:5143 Date: 2001-02-12T04:22:26+00:00 List-Id: Peter Richtmyer wrote: > > 1) In a Package Spec, it would be nice to be able to declare > variables that are "constants' to other packages. that is, they can > be "read" by other packages, but not written / updated. Code > within the package (and child packages, etc) could update these > variables like any other variables. > > e.g.: > > Package A is > > B : constant Integer := 5; -- normal constant > C : convar integer := 8; -- externally constant, internally > variable > ... > > Note the keyword "convar" is used for lack of a better keyword for now. This already exists. It is called a function: B : constant Integer := 5; function C return Integer; In the package body: C_Value : Integer := 8; function C return Integer is -- null; begin -- C return C_Value; end C; If this causes timing problems compared to a global variable you can inline C. -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail