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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,127a2e86cb149c01 X-Google-Attributes: gid103376,public From: Steve Jones - JON Subject: Re: p(x: out File_Type) Date: 1996/12/03 Message-ID: <2su3q396xi.fsf@hpodid2.eurocontrol.fr>#1/1 X-Deja-AN: 202300713 references: <57u5ik$qdc$1@goanna.cs.rmit.edu.au> organization: Eurocontrol Experimental Centre, Bretigny-Sur-Orge, France newsgroups: comp.lang.ada Date: 1996-12-03T00:00:00+00:00 List-Id: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes: > > Does > > procedure P(...; X: out File_Type) > > ever make sense, where File_Type is one of the standard file types > (from Sequential_IO, Direct_IO, or Text_IO)? First place when this would be used is when it conflicts with a company standards, some detail that functions should be non destructive operators only. So you could have a standard function like procedure Initialise_Recording(Recording_Number : in INTEGER; Workstation_Number : in NATURAL; Recording_File : out File_Type); (The actual names and types of the paramaters have been change to protect the innocent). I have seen single out parameters on other occasions, normally to keep a standard interface (ie 15 procedures doing similar things all implemented as procedures but 6 have an out parameter). But the first reason is the one I see most often, to be fair to it as a rule in standards it seemed to work fairly well on the last project I was on as it made it clearer where people were doing the actual work and what was information serving. [snip]