comp.lang.ada
 help / color / mirror / Atom feed
* In mode parameter in an assignment statement
@ 2018-10-13  0:48 Anh Vo
  2018-10-13  5:52 ` Jacob Sparre Andersen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anh Vo @ 2018-10-13  0:48 UTC (permalink / raw)


   -- ...

   ------------------
   -- Compute_Data --
   ------------------

   procedure Compute_Data (Region : Mapped_Region) is
      Data_Shift : constant Storage_Offset :=
         Storage_Offset (Region.User_Offset - Region.System_Offset);
   begin
      if Region.User_Size = 0 then
         Region.Data := Empty_String'Address;
      elsif Region.Mapped then
         Region.Data := Region.Mapping.Address + Data_Shift;
      else
         Region.Data := Region.Buffer.all'Address + Data_Shift;
      end if;
   end Compute_Data;

end GNATCOLL.Mmap;

The above code is the tail end of package gnatcoll-mmap.adb.

I thought it should be rejected during compilation because in mode parameter is not allowed in an assignment statement. But, it was compiled successfully under GNAT obviously.

What did I miss? Thanks in advance.

Anh Vo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-15 16:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13  0:48 In mode parameter in an assignment statement Anh Vo
2018-10-13  5:52 ` Jacob Sparre Andersen
2018-10-13  6:03 ` Per Sandberg
2018-10-13  8:38 ` Jeffrey R. Carter
2018-10-15 16:05   ` Anh Vo

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