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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Create and Append_File Date: Thu, 6 Jun 2019 16:24:52 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Thu, 6 Jun 2019 21:24:52 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="3671"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:56510 Date: 2019-06-06T16:24:52-05:00 List-Id: I believe it means the same as Out_File. Other requirements in RM (not very clear ones, I'm afraid) require the file opened by Create to be empty, whether or not the file previously existed. So, if Create allows (re)creating an existing file (it doesn't have to, it could raise Use_Error), that file will be empty. In that case, Out_File and Append_File are the same. As you note, Create (In_File) is already nonsense, so Create (Append_File) might as well be nonsense as well (it's *less* nonsense in any case, since a modeless Reset preserves the mode, and the file wouldn't necessarily be empty at that point). Randy. "Jeffrey R. Carter" wrote in message news:qdbu0n$cor$1@dont-email.me... > You can call Create with mode Append_File. I'm trying to figure out what > that's supposed to do (as opposed to what compilers do). I've read ARM > A.7, A.8.2, and A.10.2, and am still not sure. > > It seems there are 2 likely interpretations: > > 1. Create creates a file, so this is the same as using mode Out_File > 2. Since mode Append_File was given, it means to open the file in append > mode if it exists, or create it as for mode Out_File if it doesn't > > If 1., then why allow Append_File for Create? A subtype excluding it could > be defined for Create. > > Of course, you can also Create a file with mode In_File, which I presume > means to create an empty file and open it for reading, which doesn't seem > very useful, so maybe I shouldn't expect these to make sense. > > -- > Jeff Carter > "He nevere yet no vileynye ne sayde > In al his lyf unto no maner wight." > Canterbury Tales > 156