Err Global Variable

See Also: Global Variables Used by Data Dictionaries

Purpose

To provide a means for determining if an error has been generated, and for restoring the error indication to negative.

Type

Boolean

What It Does

Whenever a runtime error occurs in DataFlex, Err is set true. After occurrence of the first error, Err remains true until it is reset false by an explicit command.

If (Err) Begin

    send Stop_Box "An Error was Encountered"

End

Move False to Err

If Err is true when the first line above is executed, it displays the "An Error was Encountered". The next line unconditionally resets Err false.

If (Err) Begin

    Send DoUpdate

End

If Err is true when this line of code is executed, Procedure DoUpdate is executed. DoUpdate would typically have a "Move False to Err" line in it.

Notes

Boolean bErr

:

Send Request_Save of oCustomer_DD

Move (Err) to bErr

:

If (bErr) Begin

    :

End