Modify ↓
Opened 16 years ago
Closed 16 years ago
#1600 closed Bug (No Bug)
please check "=" Operator bug
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.6.0 | Severity: | None |
| Keywords: | = | Cc: |
Description
please check "=" Operator bug
- ConsoleWrite (0 = "x") ; -> True
- ConsoleWrite (0 == "x") ; -> False
- ConsoleWrite (1 = "x") ; -> False
- ConsoleWrite (1== "x") ; -> False
why "1." result is true, is this bug?
i found this issue in Array.au3 (_ArraySearch)
case compare 0 vs string
971 : If $avArray[$i] = $vValue Then Return $i
997 : If $avArray[$i][$j] = $vValue Then Return $i
Attachments (0)
Change History (2)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
What do I have to do to make it clear to you people that if you are asking a question on the issue tracker you're in the wrong place? I mean, I only have it in the big giant red box. I suggest you try reading it next time because your failures in creating this ticket are numerous.
Note:
See TracTickets
for help on using tickets.

I think, this was discussed many times in the forums and this is "by design":
is equivalent to:
ConsoleWrite((0 = Number("x")) & @lf)Since Number("x") returns 0 the statement is True. The following produces "expected" result on the other hand:
ConsoleWrite(("x" = 0) & @lf)as it is the same as:
ConsoleWrite(("x" = String(0)) & @lf)