Modify ↓
#2238 closed Bug (No Bug)
Syntax check warning on using variable inside declare state
| Reported by: | 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 by , 14 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → 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 by , 14 years ago
- 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 by , 14 years ago
I will ask question then. Do you difference between warning and error?
Anyway, this is legacy thing, right or wrong. Using "MustDeclareVars" option that script wouldn't run.
Version 0, edited 14 years ago by (next)
comment:4 by , 14 years ago
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.
Note:
See TracTickets
for help on using tickets.
