Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 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 Changed 9 years ago by anonymous

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 Changed 9 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

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

Anyway I think the doc explain what is happening.

comment:3 Changed 9 years ago by anonymous

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

yes.

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.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.