From: FritzVonBraun <sf@saf.com>
Subject: How To Pass Large Object Arguments
Date: Sat, 23 Nov 2013 23:20:53 -0800
Date: 2013-11-23T23:20:53-08:00 [thread overview]
Message-ID: <sqadnfc3IfFSNQzPnZ2dnUVZ_jydnZ2d@giganews.com> (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
next reply other threads:[~2013-11-24 7:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 7:20 FritzVonBraun [this message]
2013-11-24 11:12 ` How To Pass Large Object Arguments 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox