Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2846 closed Bug (No Bug)

Multiline statements error

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

Description

Any statement containing two consecutive underscores is an error.

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

Attachments (0)

Change History (2)

comment:1 follow-up: Changed 6 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.

M23

comment:2 in reply to: ↑ 1 Changed 6 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

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.