Function Reference


Display a message if assertion fails

#include <Debug.au3>
_Assert ( $sCondition [, $bExit = True [, $iCode = 0x7FFFFFFF [, $sLine = @ScriptLineNumber]]] )


$sCondition The condition (expression quoted) that must evaluate to true.
$bExit [optional] If true, the script is aborted.
$iCode [optional] The exit code to use if the script is aborted.
$sLine [optional] Displays the line number where the assertion failed. If this value is not changed, then the default value will show the correct line.

Return Value

Returns the result of the condition (Only valid when not exiting).


@error and @extended are not destroyed on return.


#include <Debug.au3>

Local $sABC = ""
_Assert('$sABC > ""')