This function will bookmark the current buffer position in the marker with the given ID. The marker will now track the position while writing or deleting data in the buffer.
You may also call this function to update any existing marker to a new position at any time.
SYNTAX:
err% = SetBufMark% (buf$(), markID%)
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, in which you wanna set the marker.
markID% (INTEGER)
- Any ID number in the range 1 to 100, which identifies this marker. You may give this as literal number under self control or use FreeBufMarkID() to obtain the next free (unused) ID.
RESULT:
err% (INTEGER)
- This is usually zero (0) on success, or error SBE_BadIDNumber, if the given ID number was out of the valid range (see Common-Info).
- No other errors may happen, so if you make sure your used IDs are valid, then you may waive to explicit error checking.
NOTES:
- You should remove no longer needed buffer markers to make its IDs available for reuse.