This function will return the next unused find data ID. This is similar to the FREEFILE function for file access numbers. Each buffer can manage upto 100 find datas, starting with ID number 1 and counting up to number 100.
If you use this function or if you manage the 100 find datas yourself in your program is up to you. However, library code should always use this function to avoid conflicts with ID numbers already used by the main program code.
SYNTAX:
findID% = FreeBufFindID% (buf$())
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, from which you wanna query the next free find data ID.
RESULT:
findID% (INTEGER)
- The next free find data ID. Note this ID still remains unused until the find data are actually set, hence subsequent calls may return the same ID, if the find data are not set immediately.
- If no more free IDs are available, then the error SBE_BadIDNumber is returned (see Common-Info).
NOTES:
- You should remove no longer needed find datas to make the IDs available for reuse.