Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

SPORT_PEEK_LINE

Serial Port I/O Function: Returns information about the availability of input records. This routine is only available for Windows.

Module

USE IFPORT

result = SPORT_PEEK_LINE (port [,present] [,count])

port

(Input) Integer. The port number.

present

(Output; optional) Integer. 1 if data is present, 0 if no data has been read.

count

(Output; optional) Integer. The count of characters that will be returned by SPORT_READ_DATA.

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    present
INTEGER    count

iresult =  SPORT_PEEK_LINE( 2, present, count )
END

See Also