SPORT_READ_DATA

Run-Time Function: Reads available data from the specified port. This routine stalls until at least one character has been read.

Module: USE DFLIB

Syntax

iresult = SPORT_READ_DATA (port, buffer [, count])

port
(Input) Integer. The port number.


buffer
(Input) Character*(*). The data that was read.


count
(Optional; input) Integer. The count of bytes read.

Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, a Win32 error value.


Note: CR and LF characters may not be returned depending on the mode specified in the SPORT_CONNECT( ) call.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: SPORT_CONNECT, SPORT_PEEK_DATA, SPORT_READ_LINE, SPORT_WRITE_DATA, Using the Serial I/O Port Routines, and Communications, and Communications Functions in the Win32 SDK

Example

USE DFLIB
INTEGER(4)      iresult
INTEGER         count
CHARACTER*1024  rbuff

iresult = SPORT_READ_DATA( 2, rbuff, count )
END