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,9b39dbd8effaa623 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: simple problem? Date: 1996/05/10 Message-ID: #1/1 X-Deja-AN: 154180598 references: organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-05-10T00:00:00+00:00 List-Id: John gave a very nice answer to this question, however he also said: > Now, I suspect that you'll want to be able to append to the hoax file > later. The best solution is to get an Ada95 compiler. You would still > use Text_IO, but you would Open the hoax file in Append_File mode, which > isn't available in Ada83. If you're stuck with an Ada83 compiler, the > best way to "append" to a text file with variable-length records is, at > the start of the program, to read the entire file a line at a time and > write each line to a new file. When you get to the end of the input file, > close it, but leave the output file open for further writing. At the end > of your program, delete the input file and rename the output file. (The > Ada95 solution is easier!) Ada 83 does not prohibit opening a Text_IO file for appending. In fact it provides a mechanism, the Form string, for requesting append mode. Many Ada 83 compilers support this. Unfortunately, the appropriate Form string is implementation defined, so check your vendor supplied appendix F. (Sorry to waste your time discussing obsolete languages. ;-) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...