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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e3ba37c5a979fdcb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Ada.Text_IO.Create Date: 19 Feb 2006 15:49:34 -0600 Organization: LJK Software Message-ID: References: <1140218028.145204.141420@z14g2000cwz.googlegroups.com> <1140249851.389233.273980@g47g2000cwa.googlegroups.com> <1140297548.116832.212770@g43g2000cwa.googlegroups.com> <57OJf.45346$d5.201767@newsb.telia.net> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1140385767 15510 192.135.80.34 (19 Feb 2006 21:49:27 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sun, 19 Feb 2006 21:49:27 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2998 Date: 2006-02-19T15:49:34-06:00 List-Id: In article , "Jeffrey R. Carter" writes: > Martin Dowie wrote: > >> That's the subprogram I'd prefer to have an extra "Create_If_Absent : >> Boolean := False" parameter. And, yes, I know it control coupling (bad) >> but IMHO, I would find the code cleaner. > > I'm not sure I see the value of this. If you're opening for reading, a > Create_If_Absent would create an empty file; End_Of_File would be true > immediately. If you're opening for writing, aren't you going to overwrite the > contents anyway? In that case, doesn't Create do what you want? Depending on your operating system, there is a difference between creating a new version of a file for write and opening the existing version for write.