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-Thread: 103376,74bc23dcb20218db X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!aioe.org!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: How to access this package written in C? Date: Fri, 23 Apr 2010 11:39:23 -0400 Organization: The Wasteland Message-ID: References: <4e9d2aaf-c0a6-4798-b838-8f5b7c4a39d1@k33g2000yqc.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news1.google.com comp.lang.ada:10163 Date: 2010-04-23T11:39:23-04:00 List-Id: In article , "John B. Matthews" wrote: > In article > , > resander wrote: > > > Prodrecord address: -1079352648 > > code field address: -1079352648 > > bcode field address: -1079352644 > > ccode field address: -1079352643 > > third field address: -1079352640 > > descr field address: -1079352636 > > price field address: -1079352624 > > ... > > Q1. > > Addresses are not negative. How do I output a System.Address? > > -1079352648 = 0xBFAA62B8 > -1079352644 = 0xBFAA62BC > ... > > This recent thread discusses several ways to display hexadecimal: > > 44> > > A.10.8 Input-Output for Integer Types may be the most straightforward: > > For example, with Ada.Text_IO; with System.Storage_Elements; procedure Modular is package Memory renames System.Storage_Elements; package Address_IO is new Ada.Text_IO.Modular_IO(Memory.Integer_Address); begin Ada.Text_IO.Put("Address of procedure Modular: "); Address_IO.Put( Item => Memory.To_Integer(Modular'Address), Width => 0, Base => 16); Ada.Text_IO.New_Line; end Modular; -- John B. Matthews trashgod at gmail dot com