atc() function

Syntax

ATC(cSearchExpression,cExpressionSearched[,nOccurrence])

Parameter

cSearchExpression

Specify character expression The atc() function will search for this character expression in cExpressionSearched.

cExpressionSearched

Specify the character expression in which cSearchExpression is searched. The parameters cSearchExpression and cExpressionSearched can both be memo fields of any size.

nOccurrence

Specify to search for the nOccurrence occurrence of cSearchExpression in cExpressionSearched (first, second, third, etc.). By default, the atc() function searches for the first occurrence of cSearchExpression (nOccurrence=1). Use the parameter Occurrence to search for other occurrences of cSearchExpression in cExpressionSearched.

Description

The atc() function searches for the first character expression that appears for the first time in the second character expression, and ignores the case of the characters in the character expression when searching. To search for characters with case sensitivity, use the AT() function. The atc() function searches for the first character expression that appears for the first time in the second character expression, and the function returns the position of the first character of the first character expression in the second character expression. If it is not found, the return value of the atc() function is 0.

Example

store'nowisthetimeforallgoodmen...'togcstringstore'isthe'togcfindstringclear?atc(gcfindstring,gcstring)&& show 5store'is'togcfindstring?atc(gcfindstring,gcstring )&&display 5?atc('now',gcstring)&&display 1

Related Articles
TOP