comp.lang.ada
 help / color / mirror / Atom feed
* Q:Assigning address of variable to pointer ?
@ 1998-04-16  0:00 Margarit Nickolov
  1998-04-16  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 3+ messages in thread
From: Margarit Nickolov @ 1998-04-16  0:00 UTC (permalink / raw)





I am e newcomer to Ada

I am not an english-speaking person.

Can anyone help me with the follwing code ?


  type element is record
     ...
  end record;

  type p_element is access element;

  e1: element;
  p_e1: p_element := null;

  begin
    e1 := some_value;
    -- now, how to point p_e1 to the variable e1 ?
    p_e1.all := e1;  -- is that correct ?
                     -- I have got  exception RANGE_ERROR.
  end;


  I just want to assign 'address' of some dynamic/static allocated memory to 
'pointer variable'.

Please reply to man@school.digsys.bg






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

end of thread, other threads:[~1998-04-16  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-16  0:00 Q:Assigning address of variable to pointer ? Margarit Nickolov
1998-04-16  0:00 ` Matthew Heaney
1998-04-16  0:00   ` Steve Doiel

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