Modify

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 anonymous, 11 years ago

Could you:

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

Jos

comment:2 by anonymous, 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 anonymous, 11 years ago

And the interpreter doesn't stop after the line

() ConsoleWrite ("test")

comment:4 by jchd18, 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?

in reply to:  4 comment:5 by anonymous, 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.

comment:6 by jchd18, 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:7 by anonymous, 11 years ago

Easy enough to find errors in Au3Check.

(f) (1)

comment:8 by anonymous, 11 years ago

Sorry, I misread.

in reply to:  6 comment:9 by anonymous, 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:10 by jchd18, 11 years ago

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

comment:11 by BrewManNH, 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 jchd18, 11 years ago

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.