From: Hans Marqvardsen <hm@ddre.dk>
Subject: Re: simple question - how to emulate void * ?
Date: 1998/10/22
Date: 1998-10-22T00:00:00+00:00 [thread overview]
Message-ID: <362EF435.7575@ddre.dk> (raw)
In-Reply-To: dale-2310981318260001@dale.ppp.cs.rmit.edu.au
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.
next prev parent reply other threads:[~1998-10-22 0:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-23 0:00 simple question - how to emulate void * ? Craig Allen
1998-10-23 0:00 ` Tom Moran
1998-10-23 0:00 ` Dale Stanbrough
1998-10-22 0:00 ` Hans Marqvardsen
1998-10-22 0:00 ` Hans Marqvardsen [this message]
1998-10-23 0:00 ` John McCabe
1998-10-23 0:00 ` Ed Falis
1998-10-23 0:00 ` dennison
1998-10-24 0:00 ` Joe Wisniewski
1998-10-25 0:00 ` dewar
1998-10-24 0:00 ` Dale Stanbrough
1998-10-24 0:00 ` Tucker Taft
1998-10-24 0:00 ` Robert A Duff
1998-10-23 0:00 ` dennison
1998-10-23 0:00 ` David C. Hoos, Sr.
1998-10-23 0:00 ` David C. Hoos, Sr.
1998-10-23 0:00 ` Jeff Carter
1998-10-24 0:00 ` Dale Stanbrough
1998-10-25 0:00 ` dewar
1998-11-05 0:00 ` Craig Allen
1998-11-06 0:00 ` Tom Moran
1998-11-06 0:00 ` Dale Stanbrough
1998-11-06 0:00 ` Matthew Heaney
1998-11-06 0:00 ` dewarr
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox