comp.lang.ada
 help / color / mirror / Atom feed
* functions with mode "in" only
@ 1986-06-09 17:53 "Rogers.Pat"
  0 siblings, 0 replies; only message in thread
From: "Rogers.Pat" @ 1986-06-09 17:53 UTC (permalink / raw)


The "problem" of having only mode "in" parameter functions is easily
approached via access types. To wit, althought an actual parameter of
an access type is a constant and not changeable, the designated value is
not a constant at all, and may be changed at will, as desired. 

Of course, if the data structure to be updated is not dynamically allocatable
due to design considerations, then one may pass an indicator into the data
structure instead, and have the function update the "global" data externally 
(as was previously discussed). This should not be dismissed out of hand, since
this external data structure may be encapsulated inside the body of the
function's defining package, with the desired principles enforced. 
(If you think this is a "work-around", consider how to do a clean implementation
of random numbers with some other method...).

In case this has been previously suggested, my apologies for not getting to
my mail as fast as I would like.

Regards,
Pat Rogers
High Tech Lab
UH/CL

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1986-06-09 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-06-09 17:53 functions with mode "in" only "Rogers.Pat"

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