SERIAL_PORT_EXISTS()

SERIAL_PORT_EXISTS(X)

RETURNS 1 IF THE SERIAL PORT NUMBER X EXISTS, 0 OTHERWISE

  • Type: Function
  • Parameter: 1
  • Group: Input-Output

ACTION

The function SERIAL_PORT_EXISTS(X) returns 1 if the serial port number X exists, 0 otherwise.

SYNTAX: Result = SERIAL_PORT_EXISTS(X)

  • X = port number (integer or real).

USE

  • The function SERIAL_PORT_EXISTS() is used to know if a serial port exists.

ERROR

  • If number X is not a correct expression.

EXAMPLE

rem test if serial port number 1 exists

if serial_port_exists(1)=1

print "serial port n°1 exists"

else

print "serial port n°1 does not exist"

end_if

SEE ALSO

SERIAL

SERIAL_PORT

SERIAL_BAUDRATE

SERIAL_STOPBITS

SERIAL_DATABITS

SERIAL_PARITY

SERIAL_OPEN

SERIAL_CLOSE

SERIAL_WRITE

ON_RECEIVE

SERIAL_READ$()