NORMALIZE( ) Function

See Also

Converts a character expression, supplied by a user, into a form that can be compared with Visual FoxPro function return values.

Syntax

NORMALIZE(cExpression)

Returns

Character

Arguments

cExpression

Specifies the character expression to normalize.

Remarks

NORMALIZE( ) returns a character string from the character expression cExpression with the following changes:

For example, a user may enter an index expression like the following in the Expression Builder:

UPPE(cust->lname) + UPPE(cust->fname)

While this is a valid Visual FoxPro index key expression, it's difficult to compare this to the return values from a Visual FoxPro function like KEY( ). NORMALIZE( ) returns the following character string for the expression above:

UPPER(CUST.LNAME) + UPPER(CUST.FNAME)

This can be easily compared to the value returned by a function like KEY( ), allowing you, in this example, to determine if an index or index tag with the user-supplied index expression already exists.