comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: system."+" renaming using GNAT
Date: 1999/01/12
Date: 1999-01-12T00:00:00+00:00	[thread overview]
Message-ID: <77gh05$59f@hobbes.crc.com> (raw)
In-Reply-To: 369bb27b.18027210@news.nacamar.de


Oliver Hilgendorf wrote in message <369bb27b.18027210@news.nacamar.de>...
>The following statement
>
>      function "+" (Left : in System.Address; Right : in Integer)
>return System.Address renames system."+";
>
>works fine using the Rational Ada compiler (for Solaris) . It doesn't
>work with GNAT (for NT) since "+" is not defined in its package
>system.
>
>How can I make it work?
>

The package System.Storage_Elements has the following function:
function "+"(Left : Address; Right : Storage_Offset)
  return Address;

If you change your code to read:
      function "+" (Left : in System.Address; Right : in Integer)
return System.Address is
  use System.Storage_Elements;
begin
  return Left + Storage_Offset (Right);
end "+";

You should do just fine.

David C. Hoos, Sr.







  reply	other threads:[~1999-01-12  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-12  0:00 system."+" renaming using GNAT Oliver Hilgendorf
1999-01-12  0:00 ` David C. Hoos, Sr. [this message]
1999-01-13  0:00 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox