AtLine(), AtCLine(), RAtLine()
These functions are first cousins to AT(), ATC() and RAT(). Like their cousins, they also find occurrences of a specified string in another string, but these check line by line and return the line number where the string can be found. Line numbers are determined by line-break characters and the current value of SET MEMOWIDTH. ATLINE() and company are handy for searching in memo fields, but like many of the memo field-related functions, they work perfectly well on character fields, too. Usage | nLineFound = ATLINE( cSearchString, cWhereToSearch ) nLineFound = ATCLINE( cSearchString, cWhereToSearch ) nLineFound = RATLINE( cSearchString, cWhereToSearch ) |
Parameter | Value | Meaning |
cSearchString | Character | The string to look for. |
cWhereToSearch | Character or Memo | The string in which to look for cSearchString. |
nLineFound | 0 | cSearchString doesn't occur in cWhereToSearch. |
Numeric | For ATLINE() and ATCLINE(), the first line of cWhereToSearch containing cSearchString. For RATLINE(), the last line of cWhereToSearch containing cSearchString |
Example | * Find the beginning of notes for 2/1/95 nItemLine = ATLINE("2/1/95", Notes) * Find the first line referencing "freezer", regardless of case nFreezerLine = ATCLINE("freezer", Description) * Find the last line referencing "degree" nLastDegree = RATLINE("degree", LOWER(Education)) |
See Also | ALines(), At(), AtC(), RAt(), MLine(), Set MemoWidth |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.