SERIAL_PORT_EXISTS()

SERIAL_PORT_EXISTS(X)

RETOURNE 1 SI LE PORT SÉRIE NUMÉRO X EXISTE, 0 SINON

  • Type: Fonction
  • Paramètre: 1
  • Groupe: Entrées-Sorties

ACTION

La fonction SERIAL_PORT_EXISTS(X) retourne 1 si le port série numéro X existe, 0 sinon.

SYNTAXE : Résultat = SERIAL_PORT_EXISTS(X)

  • X = numéro du port (entier ou réel).

UTILISATION

  • La fonction SERIAL_PORT_EXISTS() est utilisée pour savoir si un port série existe.

ERREUR

  • Si le numéro X n'est pas une expression correcte.

EXEMPLE

rem teste si le port série numéro 1 existe

if serial_port_exists(1)=1

print "le port série numéro 1 existe"

else

print "le port série numéro 1 n'existe pas"

end_if

EN RAPPORT

SERIAL

SERIAL_PORT

SERIAL_BAUDRATE

SERIAL_STOPBITS

SERIAL_DATABITS

SERIAL_PARITY

SERIAL_OPEN

SERIAL_CLOSE

SERIAL_WRITE

ON_RECEIVE

SERIAL_READ$()