community.borland.com

Article #15350: READLN - READING A STRING

 Technical Notes Database

TN350D.txt   READLN - READING A STRING
Category   :Pascal
Platform    :All
Product    :Turbo Pascal  4.0+

Description:
Q. If I read in a string, an integer, and a character, with one
   Readln, how come there's a carriage return in the character
   variable?
A. When a string is read in there is no way to determine if the
   other values are strings or non-strings.  This means that
   regardless of a string's length, the other values are placed
   into the string variable, although they may not be visible.
   The solution is to read the string separately with a Readln.


Reference:


7/16/98 4:35:31 PM
 

Last Modified: 01-SEP-99