This function will initialize the find data with the given ID with the specified search criteria. The given criteria will be copied for internal use, hence if given via a variable, then you can immediately reuse the variable after this call.
You may also call this function to specify new search criteria for any existing find data at any time.
SYNTAX:
err% = SetBufFind% (buf$(), findID%, find$)
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, in which you wanna set the find data.
findID% (INTEGER)
- Any ID number in the range 1 to 100, which identifies this find data. You may give this as literal number under self control or use FreeBufFindID() to obtain the next free (unused) ID.
find$ (STRING)
- This are the search criteria to look for, when using FindBufFwd() or FindBufRev() with the given find data ID.
- The string can contain regular text as well as control chars and converted numbers (_MK$ or STR$), just as you need.
- For the delimiter search it should simply contain all chars, which shall be recognized as delimiters (eg. "{[()]}").
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 find data to make its IDs available for reuse.