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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc7fc1b95198137d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-30 02:43:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "M. A. Alves" Newsgroups: comp.lang.ada Subject: Re: Ada Address = C pointer ? Date: Tue, 30 Oct 2001 10:30:30 +0000 (GMT) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: avanie.enst.fr 1004438597 85669 137.194.161.2 (30 Oct 2001 10:43:17 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 30 Oct 2001 10:43:17 +0000 (UTC) To: Return-Path: X-X-Sender: In-Reply-To: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:15399 Date: 2001-10-30T10:30:30+00:00 On Mon, 29 Oct 2001 tmoran@acm.org wrote: > >very surprised if System.Address had a different representation from char* > >or void*. > Hold onto your hat! The program > with system; > with ada.text_io; > procedure junk is > x : integer; > a : constant system.address := x'address; > package sio is new ada.text_io.integer_io(system.word); > package oio is new ada.text_io.integer_io(system.offset_type); > begin > sio.put(a.segment, base=>16); > oio.put(a.offset, base=>16); > ada.text_io.new_line; > end junk; > compiles (Janus compiler) and runs, producing > 16#157# 16#60FCD4# > on the Windows 95 system I'm posting from. Interesting. The code is incompatible with GNAT. The original issue in this thread is the set of equivalences: Ada C -------------------- Address * void Address * char Null_Address NULL GNAT seems to honor these equivalences. Does Janus? -- , M A R I O data miner, LIACC, room 221 tel 351+226078830, ext 121 A M A D O Rua Campo Alegre, 823 fax 351+226003654 A L V E S P-4150 PORTO, Portugal mob 351+939354002