WRITECOMM$
|
Syntax: |
WRITECOMM$(<File Number>,<Data>)
|
||||
|
|
|
||||
|
Meaning: |
Write data to a serial port. WRITECOMM$
returns a string which contains separated by semi-colons the error code and
the number of the written characters. The error code = 0 if the data could be
written successfully, otherwise –1. |
||||
|
Parameter: |
|
||||
|
Sample: |
H$ = OPENCOMM$("COM1","9600,n,8,1",1024) RET% = VAL(SUBSTR$(H$,";",1)) FILENR% = VAL(SUBSTR$(H$,";",2)) IF RET% <> 0 THEN ... Error ... ENDIF H$ = WRITECOMM$(FILENR%,"Hello World") RET% = VAL(SUBSTR$(H$,";",1)) NUMBER_WRITTEN% = VAL(SUBSTR$(H$,";",2)) IF RET% <> 0 THEN ... Error ... ENDIF |
||||
|
See also: |
|