57 of 286
43 Console.Read Type Function returning Byte Invocation Console.Read() Discussion This function can be invoked to retrieve a character from the input queue associated with Com1. If the value of Register.Console.Echo is True, the character will automatically be sent back out via the system output queue. When this function is called it will not return until a character is available. However, other tasks will continue to execute. You may wish to use the value returned by Register.RxQueue to find out if there are characters available before calling it. See the example below. Example Dim b as Byte b = Console.Read() ' this will wait until a character is available If (GetQueueCount(CByteArray(Register.RxQueue)) > 0) Then b = Console.Read() ' read the next available character End If Compatibility This function is not available in BasicX compatibility mode. See Also Console.ReadLine, Console.Write, Console.WriteLine