comp.lang.ada
 help / color / mirror / Atom feed
* Arrays & pointers question
@ 2005-11-15 19:28 csaagpDIESPAMDIE
  2005-11-15 19:53 ` tmoran
  0 siblings, 1 reply; 7+ messages in thread
From: csaagpDIESPAMDIE @ 2005-11-15 19:28 UTC (permalink / 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.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-16 18:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-15 19:28 Arrays & pointers question csaagpDIESPAMDIE
2005-11-15 19:53 ` 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

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