465
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Syntax:
fd.find(frompos as dword, byref substr as string,
instance as word, dir as forward_back, incr as word,
mode as pl_fd_find_modes) as dword
Returns:
File position (counting from one) at which the target
occurrence of the substr was discovered, or 0 if the target
occurrence of the substr was not found.
The method also affects the state of the
.
The following status codes are possible:
0- PL_FD_STATUS_OK: Completed successfully.
1- PL_FD_STATUS_FAIL : Physical flash memory failure
(fatal).
2- PL_FD_STATUS_CHECKSUM_ERR: Checksum error has
been detected in one of the disk sectors (fatal).
3- PL_FD_STATUS_FORMAT_ERR: Disk formatting error
has been detected (fatal).
4- PL_FD_STATUS_INV_PARAM: Invalid argument have
been provided.
8- PL_FD_STATUS_NOT_READY: The disk is not mounted.
See Also:
Par
t
Description
fro
mp
os
Starting position in a file from which the search will be conducted. File
positions are counted from 1. Will be corrected automatically if out of
range.
sub
str
The search criteria.
inst
anc
e
Instance (occurrence) number to find.
dir
Search direction:
0- FORWARD: the search will be conducted from the frompos position
and towards the end of the file.
1- BACK: the search will be conducted from the frompos position and
towars the beginning of the file.
incr
Search position increment (or decrement for BACK searches).
472
446