关键字参考


Default

在函数CALL中使用的预定义关键字值.

    $var = Default

参数

None.

注意/说明

这个关键字不能用于常规计算表达式. AutoIt 不会自动检测 哪些值是可以工作的,因为可能导致性能严重下降.

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.

相关

IsKeyWord, Null

示例/演示


WinMove("[active]","",Default, Default, 200,300)    ; 只调整活动窗口大小(不移动)

Example(Default, Default)

Func Example($vParam1 = Default, $vParam2 = "第二个参数", $vParam3 = Default)
    If $vParam1 = Default Then $vParam1 = "第一个参数"
    If $vParam3 = Default Then $vParam3 = "第三个参数"

    ; Display the following parameters passed to the function.
    MsgBox(4096, "参数", "1 = " & $vParam1 & @CRLF & _
            "2 = " & $vParam2 & @CRLF & _
            "3 = " & $vParam3)
EndFunc   ;==>Example