Modify

Opened 11 years ago

Closed 11 years ago

#2956 closed Bug (No Bug)

EndFunc not required in the last function of the script

Reported by: jguinch Owned by:
Milestone: Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: EndFunc Cc:

Description

With this code :

_Hello()

Func _Hello()
	MsgBox(0, "", "Hello !")
	MsgBox(0, "", "Hello again !")

I can compile it (from the context menu) and run it (double click on the file).

Maybe the end of file acts like EndFunc ?

Attachments (0)

Change History (3)

comment:1 by jchd18, 11 years ago

It seems that EOF has Exit semantics, as the following tends to demonstrate: you see only one MsgBox.

#AutoIt3Wrapper_Run_AU3Check=n

_Hello(1)
_Hello(2)

Func _Hello($n)
	MsgBox(0, "", "Hello, I'm " & $n)

I would classify as "No bug" since Au3Check correctly raises an error. Think of it as a feature.

Last edited 11 years ago by jchd18 (previous) (diff)

comment:2 by anonymous, 11 years ago

OK, thanks JC.
Understandable behaviour, still strange...

comment:3 by jchd18, 11 years ago

Resolution: No Bug
Status: newclosed

Not so strange if you realize that a script with a single line MsgBox(...) will not complain about Exit missing. From there to regarding EOF as an implicit Exit is a small and rather logical step.

Closing now.

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.