comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Strings and reading from a file
Date: 1999/05/12
Date: 1999-05-12T00:00:00+00:00	[thread overview]
Message-ID: <7hcige$atv@hobbes.crc.com> (raw)
In-Reply-To: 7hc358$ha5$1@news.iinet.net.au


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.











  reply	other threads:[~1999-05-12  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-12  0:00 Strings and reading from a file Cameron Hodge
1999-05-11  0:00 ` David Botton
1999-05-12  0:00 ` Gautier
1999-05-12  0:00 ` Robert Dewar
1999-05-12  0:00   ` Cameron Hodge
1999-05-12  0:00     ` David C. Hoos, Sr. [this message]
1999-05-12  0:00     ` Marin David Condic
1999-05-12  0:00       ` Tom Moran
1999-05-12  0:00         ` Marin David Condic
1999-05-13  0:00       ` jrcarter001
1999-05-13  0:00         ` dennison
1999-05-13  0:00           ` Martin C. Carlisle
1999-05-13  0:00             ` David Botton
1999-05-13  0:00               ` David Botton
1999-05-14  0:00               ` Jean-Pierre Rosen
1999-05-14  0:00                 ` Keith Thompson
1999-05-14  0:00                   ` David C. Hoos, Sr.
1999-05-14  0:00                     ` Keith Thompson
1999-05-15  0:00                       ` David C. Hoos, Sr.
1999-05-16  0:00                   ` Jean-Pierre Rosen
1999-05-13  0:00             ` Marin David Condic
1999-05-13  0:00               ` Hyman Rosen
1999-05-13  0:00               ` Keith Thompson
1999-05-14  0:00                 ` Pascal Obry
1999-05-15  0:00             ` jrcarter001
1999-06-05  0:00               ` Matthew Heaney
1999-05-12  0:00   ` dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox