TApxComPort.GetChar

TApxComPort

function GetChar : Char;

Returns the next character from the dispatcher buffer.

If at least one character is available in the dispatcher buffer, GetChar returns the first available one.

To determine if line errors occurred while the communications driver was receiving this data, check the LineError property after calling GetChar.

The following example returns the next available character in C:

var
  C : Char;
...
if ApxComPort.CharReady then
  C := ApxComPort.GetChar;

See also: CharReady, GetBlock, PeekChar