48
Console.ReadLine
Type
Function returning String
Invocation
Console.ReadLine()
Discussion
This function can be invoked to retrieve a sequence of characters from the system input queue
terminated by an end-of-line character. If the value of Register.Console.Echo is True, each
character received will automatically be sent back out via the system output queue. When this function is
called it will not return until an end-of-line character is received. However, other tasks will continue to
execute. The end-of-line character is line feed (&H0a) by default but you may change it using
Register.Console.EOL.
While the characters of the line are being read, if a backspace character is received (&H08) the most
recently received character will be deleted from the internal buffer. Additional backspace characters will
each remove another character from the buffer until it is empty. If a carriage return is received (&H0d) it
will be ignored unless Register.Console.EOL is a carriage return.
The end-of-line character is not included in the returned string and the maximum length of the string is
255 characters. Additional characters received after the 255th character will be discarded while awaiting
the end-of-line character.
Example
Dim s as String
s = Console.ReadLine()
Compatibility
This function is not available in BasicX compatibility mode.
See Also