Modify ↓
#1098 closed Bug (No Bug)
Case logical bug
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.1.1 | Severity: | None |
| Keywords: | Cc: |
Description
("abc" = 0) IS TRUE IN:
Select
Case "abc" = 0
MsgBox(0, "test1", "test1")
Case "xyz" = "xyz"
MsgBox(0, "test2", "test2")
Case Else
MsgBox(0, "test3", "test3")
EndSelect
Attachments (0)
Change History (1)
comment:1 by , on Jul 29, 2009 at 7:04:48 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

It's not a bug. The string "abc" is promoted to a number. The number its promoted to is 0 because the string does not contain digits. Thus 0 is compared to 0 which is true.