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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c08cfbd3f797c1c,start X-Google-Attributes: gid103376,public From: Hans Marqvardsen Subject: Re: simple question - how to emulate void * ? Date: 1998/10/22 Message-ID: <362EF435.7575@ddre.dk>#1/1 X-Deja-AN: 404206242 Content-Transfer-Encoding: 7bit References: <9v6hGdgMLuwN-pn2-Oc41W71Dq3U9@dt182n2f.tampabay.rr.com> Content-Type: text/plain; charset=us-ascii Organization: DDRE Mime-Version: 1.0 Reply-To: hm@ddre.dk_nospam Newsgroups: comp.lang.ada Date: 1998-10-22T00:00:00+00:00 List-Id: Dale Stanbrough wrote: > > -------------------------------------------------------- > with System; use System; > with System.Storage_Elements; use System.Storage_Elements; > with System.Address_To_Access_Conversions; > with text_io; use text_IO; > > procedure PB is > > package Char_Address is new System.Address_To_Access_Conversions (Character); > use Char_Address; > > procedure Print_Bytes (Buffer : System.Address; Length : Integer) > is > Temp : System.Address; > begin > Temp := Buffer; > for i in 1..Length loop > Text_IO.Put (To_Pointer (Temp).all); > Temp := Temp + 1; > end loop; > end Print_Bytes; > > X : String := "Hello There"; > begin > > Print_Bytes (X'Address, X'Length); > > end; > -------------------------------------------------------- > (compiled and works using Gnat3.10, Sparc Solaris). > Dale Strangely, using OA 7.1.1 it wont compile. Error message: Temp := Temp + 1; Line 20 col 23: the expression is ambiguous.