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,a0833bbed8752e1f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn13feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: variable lenght strings Date: 24 Oct 2004 16:30:57 -0500 Organization: LJK Software Message-ID: References: <1209757.RtbsXkycWi@linux1.krischik.com> <1545949.UqgTOGcyTg@linux1.krischik.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1098653448 7956 192.135.80.34 (24 Oct 2004 21:30:48 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sun, 24 Oct 2004 21:30:48 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:5683 Date: 2004-10-24T16:30:57-05:00 List-Id: In article , Jeffrey Carter writes: > Martin Krischik wrote: > >> When the last line is missing a CR/LF - happens often in user edited >> files - and is a multiple of the internal buffer in lenght then an >> exception is raised. > > Get_Line is specified in A.10.7: > > Reads successive characters from the specified input file and assigns > them to successive characters of the specified string. Reading stops if > the end of the string is met. Reading also stops if the end of the line > is met before meeting the end of the string; in this case Skip_Line is > (in effect) called with a spacing of 1. > > The end of the line seems to be specified in A.10.5, for End_Of_Line: > > Operates on a file of mode In_File. Returns True if a line terminator or > a file terminator is next; otherwise returns False. > > Thus a missing line terminator (CR/LF for DOS/Windows) at the end of a > file should be interpreted as end of line anyway, it seems, and any > compiler which doesn't seems to have an error. But that would be specific to DOS/Windows. Is someone arguing that a carriage-return or line feed is supposed to be the implementation for "the end of line is met" in the section quoted above ? Certainly that was not the case for Ada83 on VMS, where there is an out-of-band end of line indication.