﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3886	Default keyword  = -1 in expression	Jpm	Jpm	"It can be coherent that Default keyword act as -1.
This is coherent with the default in AutoIt builtin function which is -1.
It allows to just check -1 instead of -1 or Default

just use at the following script

{{{#!autoit
Local $vKeyword = Default
ConsoleWrite('$vKeyword = ' & $vKeyword & @CRLF)
Local $iInt = Int($vKeyword)
ConsoleWrite('$iInt = ' & $iInt & @CRLF)

ConsoleWrite(@CRLF & ""No Other display if OK, checking comparison with integers"" & @CRLF & @CRLF)

If $vKeyword <> Default Then ConsoleWrite('$vKeyword is NOT Default' & @CRLF)
If $vKeyword <> -1 Then ConsoleWrite('$vKeyword is NOT -1' & @CRLF)

If $vKeyword <> Int(-1) Then ConsoleWrite('$vKeyword <> Int(-1)' & @CRLF)
If $vKeyword <> Int(-1, 2) Then ConsoleWrite('$vKeyword <> Int(-1, 2)' & @CRLF)

If Int(-1) <> $vKeyword Then ConsoleWrite('Int(-1) <> $vKeyword' & @CRLF)
If Int(-1, 2) <> $vKeyword Then ConsoleWrite('Int(-1, 2) <> $vKeyword' & @CRLF)


Local $bRet = f(Default)
If Not $bRet Then ConsoleWrite('f(Default) is NOT True' & @CRLF)

Func f($vPar = Default)
;~ 	If $vPar = Default Then Return True ; no need to check -1 and Default
	If $vPar = -1 Then Return True
	Return False
EndFunc
}}}
"	Feature Request	assigned		AutoIt		None			
