comp.lang.ada
 help / color / mirror / Atom feed
* Strings and reading from a file
@ 1999-05-12  0:00 Cameron Hodge
  1999-05-11  0:00 ` David Botton
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Cameron Hodge @ 1999-05-12  0:00 UTC (permalink / raw)


Hey guys and girls

I know this is pretty simple but I have to read some strings in from a file.
I have declared the type to be

Firstname : String of length 1..20

I can read the string in fine, no probs there, but if the string is under
the 20 characters I get rubbish in the remaining string positions. Now I got
around this by assigning firstname := " <20 spaces>" however when I now
display this string to the screen, it displayes the full 20 characters. How
to do I remove the training Space's ????



Now I know I get the length of the string when I read it in and can declare
the varialle there and then, but I am reading in many strings all of
different lengths into an array.

hmm I hope everyone can understand this.

Thanks

vampyre@ozemail.com.au






^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~1999-06-05  0:00 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` Robert Dewar
1999-05-12  0:00   ` dennison
1999-05-12  0:00   ` Cameron Hodge
1999-05-12  0:00     ` David C. Hoos, Sr.
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             ` 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-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-15  0:00             ` jrcarter001
1999-06-05  0:00               ` Matthew Heaney
1999-05-12  0:00 ` Gautier

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