Example 1 locates the first time a character string occurs in a memo field, displays the first and last names of the employee, and the line of the memo containing the character string.
Example 2 demonstrates how the memo width affects ATLINE( ).
* Example 1
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE employee && Open employee table
CLEAR
STORE 'Japanese' TO gcFindString && Case sensitive
LOCATE FOR ATLINE(gcFindString, notes) != 0
? First_Name
?? Last_Name
? MLINE(notes, ATLINE(gcFindString, notes))
* Example 2
STORE '1234567890ABCDEFGHIJ' TO gcString
SET MEMOWIDTH TO 20
? ATLINE('AB', gcString) && Displays 1
SET MEMOWIDTH TO 10
? ATLINE('AB', gcString) && Displays 2