Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2846 closed Bug (No Bug)

Multiline statements error

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: line continuation Cc:


Any statement containing two consecutive underscores is an error.

Local $a = f (1) + f (2) + _
	_ ; Error here: unexpected underscore.

Attachments (0)

Change History (2)

comment:1 follow-up: Changed 10 years ago by Melba23

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

What else would you expect to happen? A line continuation operator is there to split long lines - adding other elements between the operator and the next section of the line will cause an error, as it would were the line to be continuous and the element inserted. Both Au3Check and AutoIt baulk at such a thing - correctly.


comment:2 in reply to: ↑ 1 Changed 10 years ago by anonymous

Right now I have to write it that way:

Local $a = f (1) + f (2) _
	+ _
	f (3)

Is that better?

Replying to Melba23:

What else would you expect to happen?

I expected the line continuation operator to do exactly what it says: continue lines. Why should the operator care about anything in the next line? Why should it care about anything except the next newline symbol? Some lines cannot be divided into multiple statements without changing the semantics. Parts of this line might need to be annotated to be useful later and should be grouped into blocks ((possibly generated) function, enumeration).
The current behavior is illogical and should be considered a bug.

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

as closed The ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.