Keyword Reference

Default

Keyword value use in function call.

    $var = Default

 

Parameters

None.

 

Remarks

This keyword should not be used in a general computation expression. AutoIt will not detect such situations because it has too much of a performance penalty.

When used in parameter passing, the behavior is specified in the corresponding AutoIt function documentation.
For UDF's, it is the scripter's responsiblity to check if the parameter has been set to Default and to perform the desired behavior in this situation.
If used, the passed parameter will be set to the Default keyword and not to an optional parameter value, if defined.

 

Related

IsKeyWord

 

Example


WinMove("[active]","",default, default, 200,300)    ; just resize the active window (no move)

MyFunc2(Default,Default)

Func MyFunc2($Param1 = Default, $Param2 = 'Two', $Param3 = Default)
    If $Param1 = Default Then $Param1 = 'One'
    If $Param3 = Default Then $Param3 = 'Three'

    MsgBox(0, 'Params', '1 = ' & $Param1 & @LF & _
        '2 = ' & $Param2 & @LF & _
        '3 = ' & $Param3)
EndFunc