ATLINE( ) Function

Example   See Also

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

Syntax

ATLINE(cSearchExpression, cExpressionSearched)

Returns

Numeric

Arguments

cSearchExpression

Specifies the character expression that Microsoft Visual FoxPro looks for in cExpressionSearched.

cExpressionSearched

Specifies the character expression that cSearchExpression searches for.

Both cSearchExpression and cExpressionSearched can be memo fields of any size.

Use MLINE( ) to return the line containing the matching character expression as a character string.

Tip   ATLINE( ) offers a convenient way to search memo fields.

Remarks

ATLINE( ) searches the second character expression for the occurrence of the first character expression. ATLINE( ) performs a case-sensitive search. Use ATCLINE( ) to perform a search that isn't case-sensitive.

If the search is successful, ATLINE( ) returns the number of the line where the match occurs. If the search is unsuccessful, ATLINE( ) returns 0.

The line number that ATLINE( ) returns is determined by the value of SET MEMOWIDTH, even if cExpressionSearched isn't a memo field. For more information, see SET MEMOWIDTH.