SPORT_PURGE

Run-Time Function: Executes the Win32 API communications function PurgeComm on the specified port.

Module: USE DFLIB

Syntax

iresult = SPORT_PURGE (port, function)

port
(Input) Integer. The port number.


function
(Input) INTEGER(4). The function for PurgeComm (see the Win32 documentation).

Results:

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

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

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

Example

USE DFWINTY
USE DFLIB
INTEGER(4) iresult
iresult =  SPORT_PURGE( 2, (PURGE_TXABORT .or. PURGE_RXABORT) )
END