Modify

Opened 10 years ago

Closed 10 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 Changed 10 years ago by anonymous

Could you:

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

Jos

comment:2 Changed 10 years ago by anonymous

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 Changed 10 years ago by anonymous

And the interpreter doesn't stop after the line

() ConsoleWrite ("test")

comment:4 follow-up: Changed 10 years ago by jchd18

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 in reply to: ↑ 4 Changed 10 years ago by anonymous

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 follow-up: Changed 10 years ago by jchd18

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 Changed 10 years ago by anonymous

Easy enough to find errors in Au3Check.

(f) (1)

comment:8 Changed 10 years ago by anonymous

Sorry, I misread.

comment:9 in reply to: ↑ 6 Changed 10 years ago by anonymous

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 Changed 10 years ago by jchd18

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

comment:11 Changed 10 years ago by BrewManNH

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 Changed 10 years ago by jchd18

  • Resolution set to No Bug
  • Status changed from new to 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.

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.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.