Modify ↓
#2238 closed Bug (No Bug)
Syntax check warning on using variable inside declare state
Reported by: | MrCreatoR <mscreator@…> | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.8.1 | Severity: | None |
Keywords: | Syntax, Dim | Cc: |
Description
I got warning with this example:
Dim $aArr[10] = [UBound($aArr)-1] MsgBox(64, 'Title', Ubound($aArr))
But if i press «Continue anyway», the MsgBox shown and the array declared properly.
So the syntax is ok?
Attachments (0)
Change History (4)
comment:1 Changed 12 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
- It would have been helpful if you had provided the warning message.
- See the part in the new ticket guidelines where it says "If you are asking a question you are at the wrong place"? You're at the wrong place.
- That is some incredibly stupid code.
comment:2 Changed 12 years ago by MrCreatoR <mscreator@…>
- I thought the warning is obvious:
WARNING: $aArr: possibly used before declaration. Dim $aArr[10] = [UBound($aArr) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
- I don't asking a question, it was rhetorical.
- The code is probably stupid, but AutoIt interpreter handle it properly. Just try to compile the script (ignore the warning) and run it.
comment:3 Changed 12 years ago by trancexx
I will ask question then. Do you know difference between warning and error?
Anyway, this is legacy thing, right or wrong. Using "MustDeclareVars" option that script wouldn't run.
comment:4 Changed 12 years ago by Valik
You assume that I will get the same results. I may not get the same results so without you explicitly providing the error message we may end up talking about two different things.
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.
Note: See
TracTickets for help on using
tickets.