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,9e2776c05028676e X-Google-Attributes: gid103376,public From: kst@sd.aonix.com (Keith Thompson) Subject: Re: Why Ada is not the Commercial Lang of Choice Date: 1997/06/21 Message-ID: #1/1 X-Deja-AN: 251538247 Sender: news@thomsoft.com (USENET News Admin @flash) X-Nntp-Posting-Host: rasht References: <33A7FBFF.29D2@mitre.org> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Originator: kst@rasht Date: 1997-06-21T00:00:00+00:00 List-Id: In <33A7FBFF.29D2@mitre.org> "Robert I. Eachus" writes: [...] > Wait a second here. The eqivalent Ada is: > > Mem_Map: Integer; > for Mem_Map'Address use 16#B0100040#; > begin > Mem_Map := 16#00344556#; > > ...which is a little shorter in terms of characters, words, and > lines. I could go into the bugs in both the Ada and the C--I'd want > pragma Volitile(Mem_Map); in both Ada and C. Most compilers will get it > "right" but why take the risk. Also, it might be necessary to call > System.Storage_Elements.To_Address, but I can't imagine any compiler for > a machine where 16#B01000040# is a meaningful address not allowing > literals for addresses. Imagine harder. 8-)} The implementation advice in RM95-13.7(37) says: "Address should be of a private type." GNAT follows this advice (the full type is modular, but that doesn't make literals available). ObjectAda makes System.Address an access type. -- Keith Thompson (The_Other_Keith) kst@sd.aonix.com <*> TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix 5040 Shoreham Place, San Diego, CA, USA, 92122-5989 "Zathras warn Zathras, but Zathras never listen to Zathras." -- Zathras