comp.lang.ada
 help / color / mirror / Atom feed
* 'address on a subprogram parameter
@ 2021-04-20 15:10 Vincent Marciante
  2021-04-20 15:52 ` AdaMagica
  2021-04-20 16:35 ` J-P. Rosen
  0 siblings, 2 replies; 13+ messages in thread
From: Vincent Marciante @ 2021-04-20 15:10 UTC (permalink / raw)


I think that I used to know this but currently am not sure:

Assuming the a value is passed by reference, is 'Address of a parameter 
always the address of the object that is passed as in:

...

  type Big_Record is ...

  Object : Big_Record;

  procedure Proc (Param :  in out Big_Record) is
  begin
    if  Param'Address /= Object'Address  then
         raise Constraint_Error;
    end if;     
  end;

begin
  Proc(Object);
  ...


Also, does parameter mode (in, in out, out) make any difference? 


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

end of thread, other threads:[~2021-04-24  9:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 15:10 'address on a subprogram parameter Vincent Marciante
2021-04-20 15:52 ` AdaMagica
2021-04-20 17:32   ` Jeffrey R. Carter
2021-04-21  9:19     ` AdaMagica
2021-04-20 17:33   ` Niklas Holsti
2021-04-20 16:35 ` J-P. Rosen
2021-04-20 17:18   ` Vincent Marciante
2021-04-20 19:25     ` Randy Brukardt
2021-04-20 19:41       ` Vincent Marciante
2021-04-24  1:25         ` Randy Brukardt
2021-04-24  9:56           ` Niklas Holsti
2021-04-21 20:17     ` Shark8
2021-04-22  9:54       ` Vincent Marciante

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