PORTREADARRAYcount
buffer
Reads data from the currently open port into the given buffer array.
PORTREADARRAY attempts to read count
bytes from the port, if they are available.
When bytes are written to buffer
, they are written as small integers (between -128 and 127).
PORTREADARRAY outputs the actual number of bytes read.
If count
is larger than the size of the buffer
array, then the number of bytes read is limited to the size of the buffer.
PORTOPEN "com1 PRINT SENTENCE [Sending...] PORTWRITEARRAY 3 LISTTOARRAY MAP [ASCII ?] [a t]
Sending... 2SHOW PORTWRITECHAR 13
1WAIT 60 MAKE "buff {0 0 0 0 0 0 0 0 0 0} PRINT SENTENCE [Receiving...] PORTREADARRAY 10 :buff
Receiving... 9PRINT SENTENCE [Data Rx...] MAP [CHAR ?] REMOVE [] ARRAYTOLIST :buff
Data Rx... at | | O K |PORTCLOSE