back to Table of Contents


SeekBuf (function)

This function sets the current buffer (cursor) position for the specified buffer using the given placement characteristics. This position is used as starting point for most buffer operations, which in any way read, write, copy or search data. The result of this function is the old position in the buffer, or negative if an error occurs. The mode is used to specify the relative start position, the displacement is added to that position and may be positive or negative. Eg. 20 from current is a position 20 bytes forward from current, -20 is 20 bytes back from current. You'll get an error, if you try to seek beyond the lower or upper bounds of the buffer.


SYNTAX:

oldPos& = SeekBuf& (buf$(), displace&, mode%)

INPUTS:

buf$() (STRING array)

displace& (LONG)

mode% (INTEGER)


RESULT:

oldPos& (LONG)


SEEK MODES:

SBM_PosRestore

SBM_BufStart

SBM_BufCurrent

SBM_BufEnd

SBM_LineStart

SBM_LineEnd

any Marker ID


back to Table of Contents