Opened 16 years ago
Closed 16 years ago
#458 closed Bug (No Bug)
($var == '')=true for, Array, DllStruct.(?)
Reported by: | mvgulik | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.12.0 | Severity: | None |
Keywords: | compare array dllStruct | Cc: |
Description
($var == ) = true for, Array, DllStruct.(?)
not sure if this is correct autoit behavior or not.(bug?)
but the following ($var == "") test returns true for a array type var.
kind a expected it to return a false as the var type/content is not a string, nor empty.
(same is true for a DllStruct var)
;~ dim $var = DllStructCreate("byte") dim $var[2] = [1,2] dim $Out = "if $var == '' then" & @CRLF if $var == '' then $Out &= 'True' else $Out &= 'False' EndIf ConsoleWrite($Out & @CRLF) MsgBox(0,'MsgBox',$Out)
tested on v3.2.12.1(missing in version list) and v3.2.13.4
also tested on v3.0.100.0 witch returned false(array).
Attachments (0)
Change History (3)
comment:1 Changed 16 years ago by mvgulik
comment:2 Changed 16 years ago by mvgulik
return behavior switches from false to true between v3.0.102.0 and v3.1.0.15
comment:3 Changed 16 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
Given that you used the STRING COMPARE OPERATOR, what part about this is a bug?
Anyway, this isn't a bug no matter what operator you use. Internally, types are changed around during comparisons and types that don't have a string representation return an empty string.
Not a bug.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
ignore the v3.2.12.1(missing in version list) part.