Modify

Opened 9 years ago

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

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 9 years ago by jchd18 (previous) (diff)

comment:2 Changed 9 years ago by anonymous

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

comment:3 Changed 9 years ago by jchd18

  • Resolution set to No Bug
  • Status changed from new to closed

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.

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.