comp.lang.ada
 help / color / mirror / Atom feed
From: csaagpDIESPAMDIE@yahoo.com
Subject: Arrays & pointers question
Date: 15 Nov 2005 11:28:54 -0800
Date: 2005-11-15T11:28:54-08:00	[thread overview]
Message-ID: <1132082934.714260.258260@g43g2000cwa.googlegroups.com> (raw)

Not used to pointers & Ada so I'd appreciate some help.

I have a simple sort routine that sorts an array of integers.
I have several variables of the same array type, so I'd like to pass in
the address of each array to the sort routine.

if my type/variable declarations are as such:

  type MYTYPE is array (1 .. 10) of INTEGER;
  X1: MYTYPE;
  X2: MYTYPE;
  X3: MYTYPE;

 I have a SORT procedure that takes 2 parameters: the first is the
number of entries,
and the 2nd is the address of the array.

What's the correct syntax for the procedure declaration, the procedure
call, and the references to the array elements inside the procedure?

thanks.




             reply	other threads:[~2005-11-15 19:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15 19:28 csaagpDIESPAMDIE [this message]
2005-11-15 19:53 ` Arrays & pointers question tmoran
2005-11-15 20:31   ` csaagpDIESPAMDIE
2005-11-15 21:03     ` Marc A. Criley
2005-11-16 13:18       ` csaagpDIESPAMDIE
2005-11-16 13:37         ` Marc A. Criley
2005-11-16 18:37           ` csaagpDIESPAMDIE
replies disabled

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