Error Messages/40116

Example Warning Message

Parameter 1 of Sqrt is non-numeric.

Description

This warning occurs with many of the core math functions when a non-number is passed for the parameter. For example, Sqrt('hello world'). When the warning is ignored, the result is NaN.

The warning is not reported when the result has no impact on the final result, as would be the case in an expression such as

If IsNumber(x) Then Sqrt(x) Else 0

If you know that non-numerics will occur, but you are confident that your logic successfully excludes them, your expression will evaluate more quickly if you enclose it within IgnoreWarnings, such as

IgnoreWarnings( If IsNumber(x) Then Sqrt(x) Else 0 )

Since this warning is often helpful for catching problems, you only want to ignore it in this fashion within expressions that are time-bottlenecks.

Comments


You are not allowed to post comments.