READCOMM$
|
Syntax: |
READCOMM$(<File Number>,<Count>)
|
||||
|
|
|
||||
|
Meaning: |
Reads data from a serial port. READCOMM$ returns a string which contains,
separated by semi-colon, the error code and the number of read characters. The error code = 0 if the
data could have been read successfulyy, otherwise it is –1. The variable EBUS_DATA$ contains the read data. |
||||
|
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$ = READCOMM$(FILENR%,100) RET% = VAL(SUBSTR$(H$,";",1)) NUMBER_READ% = VAL(SUBSTR$(H$,";",2)) IF RET% <> 0 THEN ... Error ... ELSE /* EBUS_DATA$ contains the read data ENDIF |
||||
|
See also: |
|