Modify

Opened 12 years ago

Closed 12 years ago

#2510 closed Bug (No Bug)

Empty variable

Reported by: Fulgor Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

local $aa    ; this variable is empty
local $bb="" ; this variable is empty
local $cc=1  ; this variable is not empty
local $dd=0  ; this variable is not empty, is the same like $cc

if $aa="" Then MsgBox(0, @ScriptLineNumber , "OK aa = is empty has len=0" & @CRLF & "len=" & StringLen($aa))
if $bb="" Then MsgBox(0, @ScriptLineNumber , "OK bb = is empty has len=0" & @CRLF & "len=" & StringLen($bb))
if $cc="" Then MsgBox(0, @ScriptLineNumber , "OK cc = is not empty has len=1" & @CRLF & "len=" & StringLen($cc))

if $dd="" Then
  MsgBox(0, @ScriptLineNumber , "ERROR dd = is not empty has len=1 " & @CRLF & "len=" & @CRLF & StringLen($dd))
Else
  MsgBox(0, @ScriptLineNumber , "OK dd = is empty has len=0" & @CRLF & "len=" & @CRLF & StringLen($dd))
EndIf

Attachments (0)

Change History (1)

comment:1 by J-Paul Mesnage, 12 years ago

Resolution: No Bug
Status: newclosed

AutoIt is doing conversion when variable type are not the same so "" and 0 are the same after conversion
NO BUG

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.