Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1613 closed Bug (No Bug)

Default (keyword), Auto conversion.

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

Not to sure. But if there test true. (they do)

If (10 + Default) = 9 Then ConsoleWrite("(Default + 10) = 9" & @CRLF)
If ('abc' & Default) = 'ABCDefault' Then ConsoleWrite("(Default & 'abc') = 'DefaultABC'" & @CRLF)

than (I think) these should fail. (they don't)

If 'default' <> Default Then ConsoleWrite("'Default' <> Default" & @CRLF)
If -1 <> Default Then ConsoleWrite(" -1 <> Default" & @CRLF)

Default keyword not auto converted in last cases. (direct_compare)

Attachments (0)

Change History (3)

comment:1 by anonymous, 16 years ago

No bug as it seems.

Doc: if you try and multiply two variants they will be treated as numbers, if you try and concatenate (join) two variants they will be treated as strings.

Explains the result in the first code.

This keyword(Default) should not be used in a general computation expression. AutoIt will not detect such situations because it has too much of a performance penalty.

Not to sure if this apply's to this situation. (assuming it is)

comment:2 by J-Paul Mesnage, 16 years ago

Resolution: No Bug
Status: newclosed

is it the same anonymous which give a so clear explanation?

Anyway I think the doc explain what is happening.

comment:3 by anonymous, 16 years ago

is it the same anonymous which give a so clear explanation?

yes.

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.