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!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 21 Jan 2016 07:38:24 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Out_File , excess line Date: Thu, 21 Jan 2016 08:38:52 -0500 Organization: IISS Elusive Unicorn Message-ID: References: <730fcd26-19e5-43e8-a071-5d2881d4a5bc@googlegroups.com> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.73.116.93 X-Trace: sv3-iLe58jrDJ05ktBzAMqEVz+yALZ8ZljQYeL6WY37Hsg3pJkb3nZuvp7iOC2Kf/48/5VgL0PONK7rkOCZ!NK7KxoSBTy7Iv+8aJuZe3NMrUoPt6vKS7gj1fEpBZ3dKtsHqtB8O9EgjJ/8nOrO6wxJ6JrpWcsxx!ZhwXilAH2G+mDjQpyKy3lYyZqHo= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2900 Xref: news.eternal-september.org comp.lang.ada:29186 Date: 2016-01-21T08:38:52-05:00 List-Id: On Wed, 20 Jan 2016 20:50:23 -0800 (PST), comicfanzine@gmail.com declaimed the following: >AdaMagica , > >I haven't created a file with Ada , but manually in a file manager . > >Then , i just opened it in Out_file with Ada , and then manually . > On most OS, opening a file in an output only mode will result in creating a new file, or at the least, wiping out whatever contents the file used to have. So -- your "manual" creation outside of the program isn't really a factor. On some, opening output only when the file already exists may produce an error condition. And looking at the file in some text editor may be misleading. As has been described, the Ada text file is somewhat record-oriented, with a record ending (line terminator). Note the word: terminator -- not line separator. (The standard doesn't define what the terminator is -- if the OS supports records with a record-length field at the beginning, that is valid for an implementation to use). Most likely, the system is using a line-feed (or carriage return/line-feed pair in Windows) as the terminator. Most C/Unix influenced systems will treat a line-feed as a separator, and a text editor will move the cursor to the beginning of the next line. Only by dumping the file in hex can one see what is really contained. If I interpret the standard, it is possible that just opening and closing a text file in Ada results in a file containing: Though I think most systems let get handled by the file system directory information on the length of the file. Haven't really seen a new-page code either. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/