TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Peter Hermann <[log in to unmask]>
Reply To:
Peter Hermann <[log in to unmask]>
Tue, 21 Sep 2004 14:02:20 +0200
text/plain (44 lines)
On Mon, Sep 20, 2004 at 04:44:35AM -0700, Alphonse, Prineesh wrote:
> Hi Guys,
>       I have a basic doubt regarding Access types in ADA.Suppose I have
> declared a variable as
> type Address is access Integer;
> Pointer : Address;
> Now if I do a Increment Operation in ie Pointer := Pointer + 1;
> where will the Pointer Points to now. Will it be the next Byte or is it the
> Next Integer Location ie pointer will move forward by Four Bytes.
> Thanks,
> Prineesh Alphonse      Honeywell
> Aerospace Engine Systems & Solutions.
> Ph: 91-80-6585751/6588360 Extn-8333
> [log in to unmask] <mailto:[log in to unmask]>

Dear obvious Newcomer in Ada,
you are welcome in the Ada world.
A few bits of unrelated information separated by blank lines:

Ada is called "Ada" and not "ADA"(<--insult;-).

Better prefer:
   type pointer is integer;
   pointer1 : pointer;
because the term "address" has a specific other meaning in Ada.

Arithmetic in pointers are not allowed.

team-ada is not a forum to ask questions, which could easily
found out in very basic textbooks, tutorials, and the AdaLRM (see

Now have a good time with Ada and become a fan of Ada  :-)


--Peter Hermann(49)0711-685-3611 fax3758 [log in to unmask]
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--Team Ada: "C'mon people let the world begin" (Paul McCartney)