Check an expression
Check that an expression is valid by using the CheckExpression method or the CheckNumberOrExpression method.
Check that a number is correct according to the locale by using the CheckNumberOrExpression method.
Examples
The goal is to check that an expression or a number is correct.
Example 1:
The entered expression is correct. The handle of the app is 1.
The client sends:
The engine returns:
The expression is correct. No error message is returned.
Example 2:
The entered expression is not correct. The handle of the app is 1.
The client sends:
The engine returns:
The expression is not correct. The field name located between the character 6 and 16 (=6+10) is wrong.
Example 3:
The entered expression is not correct. The handle of the app is 1.
The client sends:
The engine returns:
The expression is not correct. There is a syntax error.
Example 4:
The goal is to check that the number 10 000 is correct. The handle of the app is 1.
The client sends:
The engine returns:
The number is correct. There is no syntax error.
Example 5:
The goal is to check that the number 10,000 is correct. The handle of the app is 1.
The client sends:
The engine returns:
The number is correct. The comma "," is defined in the locale as being the thousand separator, so there is no syntax error.
Example 6:
The goal is to check that the number 10:000 is not correct. The handle of the app is 1.
The client sends:
The engine returns:
The number is incorrect. The symbol ":" is not defined in the locale, therefore 10:000 is not a valid number. "10:000" is not a valid expression as well, so an error message is returned.