Opened 11 years ago
Closed 11 years ago
#3032 closed Bug (No Bug)
AutoIt allows nonsense preceding expression
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.13.20 | Severity: | None |
| Keywords: | Cc: |
Description
The AutoIt interpreter can execute the line
()$result = ()Execute (()$expression)
Attachments (0)
Change History (12)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
The interpreter should complain before executing that line.
(ConsoleWrite ("a" & @CRLF) ConsoleWrite ("b" & @CRLF)) f (0)
Func f ($a)
ConsoleWrite ("c" & @CRLF)
EndFunc
Result:
a
b
c
"...\test.au3" (1) : ==> Error in expression.:
(ConsoleWrite ("a" & @CRLF) ConsoleWrite ("b" & @CRLF)) f (0)
^ ERROR
comment:3 by , 11 years ago
And the interpreter doesn't stop after the line
() ConsoleWrite ("test")
follow-up: 5 comment:4 by , 11 years ago
Why do you believe the interpretor should waste runtime cycles to do the extra work Au3Check is supposed to have done beforehand to catch stupid constructs?
comment:5 by , 11 years ago
Why do you think that this bug only affects "stupid constructs" and doesn't cause wrong results for "reasonable constructs"? Having written interpreters myself, I believe that this bug isn't caused by missing checks but by a logic error.
follow-up: 9 comment:6 by , 11 years ago
Either you can exhibit a valid construct (deemed valid by Au3Check) where the interpretor doesn't produce the correct result, or you can exhibit a weird construct not caught by Au3Check OR this ticket will have to close.
comment:9 by , 11 years ago
Replying to jchd18:
a valid construct (deemed valid by Au3Check) where the interpretor doesn't produce the correct result
That's impossible. How could I know or prove that that's caused by this bug?
Replying to jchd18:
a weird construct not caught by Au3Check
That's possible?
Anyway, let me try. AutoIt bug or Au3Check bug. And maybe related to this bug, through I don't know. Only Jon can know...
; #1 f(_ ) ; #2 f( _ _ ) ; #3 Local $f = f f ($f) Func f (ByRef $1) EndFunc ; #4 f (1) Func f (ByRef $1) EndFunc ; #5 ;#cs #ce ; #6 f () _ #cs #ce ; #7 f () _ _
comment:11 by , 11 years ago
The code in the first post won't run in any current or beta version of AutoIt even after I declared the variable $expression. Au3Check will flag all the code in this thread as bad.
comment:12 by , 11 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Absolutely!
Since all the code posted so far is correctly flagged as invalid by Au3Check (for a reason) then it is obviously not suitable for interpretation.
Closing this as "no bug" until an actual bug is exhibited.

Could you:
Jos