This function will return the next unused buffer marker ID. This is similar to the FREEFILE function for file access numbers. Each buffer can manage upto 100 markers, starting with ID number 1 and counting up to number 100.
If you use this function or if you manage the 100 markers 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:
markID% = FreeBufMarkID% (buf$())
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, from which you wanna query the next free marker ID.
RESULT:
markID% (INTEGER)
- The next free buffer marker ID. Note this ID still remains unused until the marker is actually set, hence subsequent calls may return the same ID, if the markers 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 buffer markers to make the IDs available for reuse.