From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.5 required=3.0 tests=BAYES_50,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:6214:20af:: with SMTP id 15mr13709721qvd.42.1613834776882; Sat, 20 Feb 2021 07:26:16 -0800 (PST) X-Received: by 2002:a5b:9d2:: with SMTP id y18mr20512448ybq.173.1613834776668; Sat, 20 Feb 2021 07:26:16 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 20 Feb 2021 07:26:16 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=85.240.208.106; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.208.106 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4d2daa8c-c159-48a4-bdf7-e9aa3b537bcan@googlegroups.com> Subject: set_index and and end_of_file with just a stream reference From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Sat, 20 Feb 2021 15:26:16 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61388 List-Id: In term of design, I have a file inside a protected type, to ensure validity for concurrrent readings/writings. An entry guarded by "Is_Open" provide with an "out" stream_access, a means to read/write from the stream file. But in the procedure I wish to also use End_Of_File and Set_Index, which require a File_Type. Which cannot be passed as "out" parameter nor through an access type, since stream_access is not an access type. Unguarded protected functions would go against the design. Should have I have the protected object provides both in the form of entries, the first with something like Is_End_Of_File: boolean := object.End_Of_File ?