JavaScript Editor js editor     Web development 

Main Page

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




Specifies the character expression to normalize.

Return Value



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

  • The character expression is converted to uppercase. However, embedded strings are not changed. An example of an embedded string is "Hello" in the character expression "LEFT('Hello',1)".

  • Any abbreviated Visual FoxPro keywords in the character expression are expanded to their full length.

  • Any -> operators separating aliases from field names are converted to periods.

  • The syntax of any Visual FoxPro commands or functions within the character expression is checked, although the expression is not evaluated. If the syntax is incorrect, Visual FoxPro generates a syntax error. NORMALIZE(В ) does not check for the existence of any fields, tables, memory variables, user-defined functions, or other references in the character expression.

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

В Copy Code
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:

В Copy Code

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

See Also

JavaScript Editor js editor     Web development