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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,988f2c34ce3e6595 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Modest proposal, 2 of 3 Date: 1996/11/26 Message-ID: #1/1 X-Deja-AN: 200932126 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: houdini.camb.inmet.com references: <575ag6$rt6@netline-fddi.jpl.nasa.gov> organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-11-26T00:00:00+00:00 List-Id: Van Snyder (vsnyder@math.jpl.nasa.gov) wrote: : ... : PROPOSAL for next standardization of Ada : Allow objects to be declared in the public part of a package : specification with mode "out". The meaning is that clients of the : package can reference the variable, but can't store into it. This can pretty much be accomplished in Ada 95 as follows: package P is type T is private; type T_Reader is access constant T; Read_Only_Global : constant T_Reader; ... private Global : aliased T; -- Global variable Read_Only_Global : constant T_Reader := T'Access; end P; You could also create a rename of "Read_Only_Global.all" if need be, perhaps in a child package. : ... : What fraction of Americans believe | Van Snyder : Wrestling is real and NASA is fake? | vsnyder@math.jpl.nasa.gov -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA