# SPORT_READ_LINE (W*S)

Serial Port I/O Function: Reads a record from the specified port. This routine stalls until at least one record has been read.

## Module

USE IFPORT

result = SPORT_READ_LINE (port,buffer[, count])

port | (Input) Integer. The port number.
buffer | (Output) Character*(*). The data that was read.
count | (Output; optional) Integer. The count of bytes read.

## Results

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

This routine will only return when a line terminator has been seen - as defined by the mode specified in the SPORT_CONNECT( ) call.

### Note

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

## Example

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

    iresult = SPORT_READ_LINE( 2, rbuff, count )
    END

Parent topic: Serial Port I/O Library Routines

## See Also

SPORT_CONNECT
SPORT_PEEK_LINE
SPORT_READ_DATA
SPORT_WRITE_LINE

Communications and Communications Functions in the Microsoft* Platform SDK