Re: ++ of C in ada



"nicolas.b" <nicolas.blanpain@xxxxxxxxxxxxxxxxxx> writes:

> 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);

You can implement such a thing using System.Storage_Elements and
System.Address_To_Access_Conversions.

Why do you want to use address arithmetic on T_Ptr?

I'm sure you'll get lots of responses saying you *don't* want to do
that, but there are some rare cases where it might be a good idea.

- Bob
.



Relevant Pages

  • Re: Iraq vet plans to return his medals in protest
    ... Rare and powerfull protest? ... Bob is entitled to his own opinions, too, but you're right - anything ... so I just started calling them collectively, ...
    (misc.survivalism)
  • Re: DOES ANYONE LIKE DYLAN NOW?
    ... music (and they are fairly rare here) and those who find ANY criticism ... I am reading a Paul Williams' book on Bob Dylan at the moment who also ...
    (rec.music.dylan)
  • Re: User define key
    ... the first command in the program (if you don't know SysRPL, ... from Keyman). ... Bob ... Prev by Date: ...
    (comp.sys.hp48)
  • Re: 49g+ library issue
    ... >for the library above the function keys. ... EQNLIB to go directly to the equation library. ... Bob ... Prev by Date: ...
    (comp.sys.hp48)
  • Re: Have you ever met one of your drum idols? I have...
    ... > Clayton, Roy Burns, Thomas Lang, Bob Gatzen... ... Add Todd Sucherman. ... Prev by Date: ...
    (rec.music.makers.percussion)