RATLINE( ) Function

Example   See Also

Returns the line number of the last occurrence of a character expression within another character expression or memo field, counting from the last line.

Syntax

RATLINE(cSearchExpression, cExpressionSearched)

Returns

Numeric

Arguments

cSearchExpression

Specifies the character expression that RATLINE( ) looks for in cExpressionSearched.

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.

Remarks

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.

Caution   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.