This function will insert data from the clipboard into the specified buffer. It can simply insert the clipboard data starting at the current buffer position or it may replace a given data block in the buffer with the data from clipboard. In either case the current buffer position is on the first byte behind the just inserted or replaced data after the call. This function is in that the counterpart to the CopyBufBlock() and CutBufBlock() functions.
SYNTAX:
err% = PasteBufBlock% (buf$(), bound&)
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, in which you wanna paste the data.
bound& (LONG)
- If zero (0), then the clipboard data are simply inserted starting at the current buffer (cursor) position.
- If it's greater zero (>0), then this is the position of the opposite end of the data block which shall be replaced with the clipboard data (the 1st end is the current buffer position).
- The bound may be less than, equal to, or greater than the current position, although equal would result into replacing nothing and instead simply inserting the data in the current position again.
RESULT:
err% (INTEGER)
- This is usually zero (0) on success, or error SBE_OutOfBounds, if the given bound was out of the valid buffer data, which is 1 to GetBufLen() + 1 (see Common-Info).
- No other errors may happen, and this one only if a bound >0 was given, so if you make sure your bound position is valid or if you pass in zero (0), then you may waive to explicit error checking.