Re: ++ of C in ada



nicolas.b wrote:
How can i implement the operator ++ in ada :

type T_Ptr is access all T_Item;
How can i implement : procedure Increment (Ptr : in out T_Ptr);
thanks


See package Interfaces.C.Pointers. Section B.3.2 in the Ada LRM (http://www.adapower.com/rm95/RM-B-3-2.html).


Think twice before going with this approach, though. Is it really necessary, or are you just carrying through a C/C++ idiom?

-- Marc A. Criley
-- www.mckae.com
-- DTraq - XPath In Ada - XML EZ Out
.



Relevant Pages

  • Re: Is this UB?
    ... sequence point. ... The other 3 is also the value of ptr at the last ... Either we read it twice, or we read it once but use it ... http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures ...
    (comp.lang.c)
  • Re: Free 50g for a level-free stack
    ... To exit press twice. ... If editLine exists then MENU is enabled. ... Every attempt I've made to run FSR has caused an instantaneous Memory ... PTR 2F3AA ...
    (comp.sys.hp48)