From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!seismo!mcvax!enea!sommar From: sommar@enea.UUCP (Erland Sommarskog) Newsgroups: net.lang.ada Subject: Functions and external values Message-ID: <1346@enea.UUCP> Date: Sat, 7-Jun-86 13:19:19 EDT Article-I.D.: enea.1346 Posted: Sat Jun 7 13:19:19 1986 Date-Received: Thu, 12-Jun-86 02:05:45 EDT References: <4000001@nucsrl> Reply-To: sommar@enea.UUCP (Erland Sommarskog) Distribution: net Organization: Enea Data, Sweden List-Id: 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