Modify

#4096 closed Bug (No Bug)

0/false is evaluated as empty string when single = is used

Reported by: xsxizas@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.18.0 Severity: None
Keywords: Cc:

Description

; Example #1
Local $iDateCalc= 0
If $iDateCalc == "" Then
MsgBox(0,"","EMPTY String")
EndIf
If $iDateCalc = "" Then
MsgBox(0,"",$iDateCalc & " is evaluated as EMPTY String with single '=' ")
EndIf

; Example 2
Local $iDateCalc= False
If $iDateCalc == "" Then
MsgBox(0,"","EMPTY String")
EndIf
If $iDateCalc = "" Then
MsgBox(0,"",$iDateCalc & " is evaluated as EMPTY String with single '=' ")
EndIf

Attachments (0)

Change History (2)

comment:1 by Jpm, on May 20, 2026 at 5:33:19 PM

If I remember well the "" is consider as false
it is documented somewhere in the doc

comment:2 by Jpm, on May 22, 2026 at 5:28:55 PM

Resolution: No Bug
Status: newclosed

Just reread the Operator preference remarks

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.