comp.lang.ada
 help / color / mirror / Atom feed
From: sommar@enea.UUCP (Erland Sommarskog)
Subject: Functions and external values
Date: Sat, 7-Jun-86 13:19:19 EDT	[thread overview]
Date: Sat Jun  7 13:19:19 1986
Message-ID: <1346@enea.UUCP> (raw)
In-Reply-To: 4000001@nucsrl

In article <4000001@nucsrl> gore@nucsrl.UUCP writes:
>
>Another example:  If only 'in' parameters are allowed in functions, why allow
>access to external variables from inside a function?

Think before you talk, man! Let's say you have a data structure, a table
for example which is totally embedded inside of a package. I.e. neither
the type nor a variable reference is available outside the package. The only
way to change AND achieve data is through procedure and function calls.
So a function reading data from the table, must of course be able to refer
to the table, which, also of course, is declared outside the function. 
You could discuss whether this is a good programming technique, but I use
it regulary, though not in Ada.

Erland Sommarskog
ENEA Data, Stockholm

      reply	other threads:[~1986-06-07 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-06-03 19:11 ForTran-Ada + flamette + questi gore
1986-06-07 17:19 ` Erland Sommarskog [this message]
replies disabled

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