Returns the line number of the last occurrence of a character expression within another character expression or memo field, counting from the last line.
- Specifies the character expression that RATLINE(В ) looks for in cExpressionSearched.
Specifies the character expression that RATLINE(В ) searches. The character expressions cSearchExpression and cExpressionSearched can be memo fields of any size.
Use MLINE(В ) to return the line containing cSearchExpression.
Tip: RATLINE() offers a convenient way to search memo fields.
RATLINE(В ), the reverse of the ATLINE(В ) function, searches a character expression cExpressionSearched, starting with the last character in cExpressionSearched, for the occurrence of cSearchExpression.
If the search is successful, RATLINE(В ) returns the number of the line where the match occurs. If the search is unsuccessful, RATLINE(В ) returns 0.
The search performed by RATLINE(В ) is case-sensitive.
|The line number that RATLINE() returns is determined by the value of SET MEMOWIDTH, even if cExpressionSearched isn't a memo field. For more information, see SET MEMOWIDTH.|
In the following example, RATLINE(В ) returns the line number for the last line in the
notes memo field containing the word "graduated." MLINE(В ) uses this value to return the contents of the line.
CLOSE DATABASES OPEN DATABASE (HOME(2) + 'data\testdata') USE employee && Opens Employee table STORE 'graduated' TO gcString STORE MLINE(notes, RATLINE(gcString, notes)) TO gnFileLine ? gnFileLine
AT(В ) Function
AT_C(В ) Function
ATC(В ) Function
ATCC(В ) Function
ATCLINE( ) Function
ATLINE(В ) Function
LEFT( ) Function
RAT( ) Function
RIGHT( ) Function
SUBSTR( ) Function
LEFTC(В ) Function
MLINE( ) Function
RIGHTC(В ) Function
SUBSTRC( ) Function
OCCURS( ) Function
INLIST( ) Function