Run-Time Function: Establishes the connection to a serial port and defines certain usage parameters.
Module: USE DFLIB
Syntax
Option | Description |
---|---|
DL_TOSS_CR | Removes carriage return (CR) characters on input. |
DL_TOSS_LF | Removes linefeed (LF) characters on input. |
DL_OUT_CR | Causes SPORT_WRITE_LINE to add a CR to each record written. |
DL_OUT_LF | Causes SPORT_WRITE_LINE to add a LF to each record written. |
DL_TERM_CR | Causes SPORT_READ_LINE to terminate READ when a CR is encountered. |
DL_TERM_LF | Causes SPORT_READ_LINE to terminate READ when a LF is encountered. |
DL_TERM_CRLF | Causes SPORT_READ_LINE to terminate READ when CR+LF is encountered. |
Passing a value of zero is the same as the following:
(DL_OUT_CR .OR. DL_TERM_CR .OR. DL_TOSS_CR .OR. DL_TOSS_LF)
This specifies to remove carriage returns and linefeeds on input, to follow output lines with a carriage return, and to return input lines when a carriage return is encountered.
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: SPORT_RELEASE, Using the Serial I/O Port Routines, and Communications, and Communications Functions in the Win32 SDK
Example
USE DFLIB
INTEGER(4) iresult
iresult = SPORT_CONNECT( 2, 0 )
END