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,d93b7c6dd17cbc81 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Strings and reading from a file Date: 1999/05/12 Message-ID: <7hcige$atv@hobbes.crc.com>#1/1 X-Deja-AN: 477119511 References: <7han2q$jkp$1@news.iinet.net.au> <7hbnnl$rca$1@nnrp1.deja.com> <7hc358$ha5$1@news.iinet.net.au> Organization: Coleman Research Corporation X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 Newsgroups: comp.lang.ada Date: 1999-05-12T00:00:00+00:00 List-Id: Cameron Hodge wrote in message <7hc358$ha5$1@news.iinet.net.au>... >True enough. I was just hoping not to have to create another array. > Instead of creating two arrays -- you could make a record for each string, having two components: 1. the string (1 .. 20), or whatever 2. The last index written into the string. Incidentally, strictly speaking you do not get directly the length of the string you read from the file -- you get the _last index_ of your string into which a character was read from the file. For example, sometimes one might read into a slice of a string -- i.e., not starting at index 1 -- or for whatever other reason read into a string whose 'First attribute /= 1.