This function will return a boolean value (flag), indicating whether the current buffer (cursor) position in the specified buffer is at the buffer end position (ie. at GetBufLen() + 1) or not. It's similar to the EOF function for file access and mainly useful to check when sequentially reading from the buffer in a closed loop. However, as the current buffer position may change with any buffer operations, this flag is a snapshot of the current state only, hence it shoudn't be cached in a variable, but always used directly.
SYNTAX:
eob% = EndOfBuf% (buf$())
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, from which you wanna retrieve the "End Of Buffer" condition.
RESULT:
eob% (INTEGER)
- Is true (-1), if the current position is at the buffer end, false (0) otherwise.
- The "End Of Buffer" position is one byte past the current buffer contents, where no more valid data is readable, but in which new data is appended when writing to the buffer end.