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,8ebde0e81efb7e79 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Importing a Unix function call Date: 1998/12/06 Message-ID: #1/1 X-Deja-AN: 419372627 Sender: matt@mheaney.ni.net References: <36683FA3.2512DECF@ndirect.co.uk> <74e7t5$2deg$1@news.gate.net> NNTP-Posting-Date: Sun, 06 Dec 1998 11:22:43 PDT Newsgroups: comp.lang.ada Date: 1998-12-06T00:00:00+00:00 List-Id: "David Botton" writes: > Since in Ada non-scalar types are passed by reference (ie as pointers) to C > functions you could get rid of the Access type and treat it just like C: The file descriptor array is an out parameter. The solution you propose makes the array an in parameter. I think this is another example of the fact that value-returning subprograms (which we spell F-U-N-C-T-I-O-N in Ada) should be allowed to have in out parameters. Clearly, what we want is the function function Pipe (Files : out File_Descriptor_Array) return Int; but we can't express this thought using the language.