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,a3fe2aac201210c0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Mats Weber Newsgroups: comp.lang.ada Subject: Re: reading a text file into a string References: <40f6bf21@dnews.tpgi.com.au> User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) Date: Sat, 17 Jul 2004 13:31:18 +0200 Message-ID: NNTP-Posting-Host: gve-gix-adsl-dynip-149-067.vtx.ch X-Trace: epflnews.epfl.ch 1090063878 83.228.149.67 (17 Jul 2004 13:31:18 +0200) Organization: EPFL X-Authenticated-User: 116308 Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!irazu.switch.ch!news-zh.switch.ch!switch.ch!epflnews.epfl.ch!matsw Xref: g2news1.google.com comp.lang.ada:2205 Date: 2004-07-17T13:31:18+02:00 List-Id: In article , "Robert I. Eachus" wrote: >while not End_of_Line(Somefile) loop > declare > Buffer: String := Get_Line(Somefile); > begin > -- process buffer > exception > ... > end; >end loop; > >Each iteration of the loop, the Buffer contains a CONSTANT String, but It's constant only if you declare it constant, as in Buffer: constant String := Get_Line(Somefile); >it is potentially different in length and content every time through.