Sign in Join
FPDoc Onlineexperiment

IndexQWord function

In unit System

Return the position of a QWord in a memory range.

Declaration

pascal
function IndexQWord(const buf; len: SizeInt; b: QWord): SizeInt

Description

IndexQWord checks the first len qwords starting at Buf, and returns the position (zero-based) of b. If b does not appear in the first len qwords, then -1 is returned.

Note that the search is done on QWord boundaries, but that the address of buf need not be on a QWord boundary.

Errors

No check is done to see whether the indicated memory range is valid. If it is not, a run-error or exception may be triggered.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.