comp.lang.ada
 help / color / mirror / Atom feed
From: Margarit Nickolov <man@digsys.bg>
Subject: Q:Assigning address of variable to pointer ?
Date: 1998/04/16
Date: 1998-04-16T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSI.3.95.980415115344.24305B-100000@school.digsys.bg> (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






             reply	other threads:[~1998-04-16  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-16  0:00 Margarit Nickolov [this message]
1998-04-16  0:00 ` Q:Assigning address of variable to pointer ? Matthew Heaney
1998-04-16  0:00   ` Steve Doiel
replies disabled

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