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_WRITE_DATA

Serial Port I/O Function: Outputs data to the specified port. This routine is only available for Windows.

Module

USE IFPORT

result = SPORT_WRITE_DATA (port,data[,count])

port

(Input) Integer. The port number.

data

(Input) Character*(*). The data to be output.

count

(Input; optional) Integer. The count of bytes to write. If the value is zero, this number is computed by scanning the data backwards looking for a non-blank character.

Results

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

NOTE:

When hardware (DTR, RTS, etc.) or software (XON/XOFF) flow controls are used, the functions SPORT_WRITE_DATA and SPORT_WRITE_LINE can write less bytes than required. When this occurs, the functions return the code ERROR_IO_INCOMPLETE, and the return value of parameter count contains the number of bytes that were really written.

Example
USE IFPORT
INTEGER(4) iresult
iresult =  SPORT_WRITE_DATA( 2, 'ATZ'//CHAR(13), 0 )
END

See Also