FINDS THE STRING S IN THE SYSTEM OBJECT NUMBER N, FROM THE POSITION P, AND RETURNS THE POSITION OF THE LAST CHARACTER OF THE FOUND STRING
ACTION
The function FIND((S$,N,P) finds and selects the string S$ in the source of system object number N, from the position P, and returns the position of the last character of the found string, or -1 if string S$ is not found.
So, it is easy to find all the occurences of a sting in a source, by calling the function FIND with the position P from a previous call.
The system object is of type : MEMO, MEMO_RICH, SYNEDIT.
SYNTAX:
Result=FIND(S,N,P)
USE ERROR EXAMPLE
rem create a SYNEDIT
dim pos
synedit 1:height 1,280
item_add 1,"dim a"
item_add 1,"a=12345"
wait 1000
rem find 34 and return position of last character
pos=find("34",1,pos)
caption 0,"position of last character="+str$(pos)
FIND()
FIND(S,N,P)
SEE ALSO
MEMO
MEMO_RICH
SYNEDIT
REPLACE()