If the level 2 output from BUFLEN is used as the input for SRECV, SRECV will not have to
wait for more characters to be received. Instead, it returns the characters already in the input
If you want to accumulate bytes in the input buffer before executing SRECV, you must first
open the port using OPENIO (if the port isn ' t already open).
SRECV can detect three types of error when reading the input buffer:
• Framing errors and UART overruns (both causing "Receive Error" in ERRM).
• Input-buffer overflows (causing "Receive Buffer Overflow" in ERRM).
• Parity errors (causing "Parity Error" in ERRM).
SRECV returns 0 if an error is detected when reading the input buffer, or 1 if no error is
Parity errors do not stop data flow into the input buffer. However, if a parity error occurs,
SRECV stops reading data after encountering a character with an error.
Framing, overrun, and overflow errors cause all subsequently received characters to be ignored
until the error is cleared. SRECV does not detect and clear any of these types of errors until it
tries to read the byte where the error occurred. Since these three errors cause the byte where the
error occurred and all subsequent bytes to be ignored, the input buffer will be empty after all
previously received good bytes have been read. Therefore, SRECV detects and clears these errors
when it tries to read a byte from an empty input buffer.
Note that BUFLEN also clears the above-mentioned framing, overrun, and overflow errors.
Therefore, SRECV cannot detect an input-buffer overflow after BUFLEN is executed, unless
more characters were received after BUFLEN was executed (causing the input buffer to
overflow again). SRECV also cannot detect framing and UART overrun errors cleared by
BUFLEN. To find where the data error occurred, save the number of characters returned by
BUFLEN (which gives the number of "good" characters received), because as soon as the error
is cleared, new characters can enter the input buffer.
I/O Device (-33)
BUFLEN, CLOSEIO, OPENIO, SBRK, STIME, XMIT
Description: Find and replace: Finds and replaces a string in a given text object. You supply the following
Level 3/argument 1: the string to search.
Level 2/argument 2: the string to find.
Level 1/argument 3: the string to replace it with.
3-170 Full Command and Function Reference
Level 1/Argument 1
Level 3/Argument 1
Level 2/Argument 2
Level 2/Item 1
( °is the left-shift of the Nkey).
Level 1/Argument 3
Level 1/Item 2
Level 1/Item 1