comp.lang.ada
 help / color / mirror / Atom feed
* How To Pass Large Object Arguments
@ 2013-11-24  7:20 FritzVonBraun
  2013-11-24 11:12 ` Ludovic Brenta
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: FritzVonBraun @ 2013-11-24  7:20 UTC (permalink / raw)


Hello all,

I am fairly new to Ada and I am wondering how I should pass large 
parameters to subprograms like arrays or records that contain other 
components like vectors or lists.

I did a lot of reading but wasnt able to find a definite answer. the 
general consensus I got from Barne's book and various blogs and 
whitepapers from Universities was that in theory IN parameters are 
copied but the compiler manufacturer is free to implement a reference to 
the original object and so on. So basically what I found out there is no 
concrete rule that says "parameter of that size or greater are passed by 
reference internally"

So my question is, is there a de facto standard at least? What does Gnat 
do in such cases? (In all honesty, my programs will never run on 
anything but Gnat, so other compilers don't really matter to me). I am 
considering passing objects that I think are too big for a copy 
operation through an access parameter, but that would basically 
contradict the principle of problem orientation instead of machine 
orientation. I would really rather be able to handle these situations 
without having to worry about the underlying mechanism myself.

Thanks for any advice



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

end of thread, other threads:[~2013-11-25 17:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-24  7:20 How To Pass Large Object Arguments FritzVonBraun
2013-11-24 11:12 ` Ludovic Brenta
2013-11-24 12:45 ` Peter C. Chapin
2013-11-25 10:59 ` Georg Bauhaus
2013-11-25 11:09 ` AdaMagica
2013-11-25 16:53 ` adambeneschan
2013-11-25 17:05   ` sbelmont700

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