Modify

#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 anonymous, on May 23, 2015 at 7:57:26 PM

Could you:

  • explain what is wrong with it?
  • post a script that will run and show the issue?

Jos

comment:2 by anonymous, on May 23, 2015 at 9:33:33 PM

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 anonymous, on May 24, 2015 at 1:05:31 AM

And the interpreter doesn't stop after the line

() ConsoleWrite ("test")

comment:4 by jchd18, on May 24, 2015 at 5:36:43 AM

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?

in reply to:  4 comment:5 by anonymous, on May 24, 2015 at 4:45:59 PM

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.

comment:6 by jchd18, on May 24, 2015 at 11:12:45 PM

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:7 by anonymous, on May 25, 2015 at 2:56:21 AM

Easy enough to find errors in Au3Check.

(f) (1)

comment:8 by anonymous, on May 25, 2015 at 2:58:07 AM

Sorry, I misread.

in reply to:  6 comment:9 by anonymous, on May 25, 2015 at 3:57:49 AM

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:10 by jchd18, on May 25, 2015 at 7:41:35 AM

Care to explicit where you think Au3Check fails in all you've posted?

comment:11 by BrewManNH, on May 26, 2015 at 9:55:54 PM

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 jchd18, on May 26, 2015 at 10:55:06 PM

Resolution: No Bug
Status: newclosed

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.

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.