Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1113 closed Bug (Wont Fix)

Can't use _ to ignore an empty line (using for array initialization)

Reported by: danielkza Owned by:
Milestone: Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc: danielkza2@…

Description

Trying to use '_', only followed by whitespace (separating a part of an initialization list from another one with an empty line), does not work. Apparently AutoIT ignores it's line-continuation meaning if it's not preceded by other characters.

Obviously, without it the statement is cut-off prematurely, and any attempt to help readability in a long initialization list is rendered impossible.

Following test case:

Global $SETTINGS_DEFAULT[22][3] = [ _
	["Folders" , "AppFolder"       , "/App"                 ], _
	["Folders" , "VBoxFolder"      , "$APP$/x86"            ], _
	["Folders" , "VBoxFolder64"    , "$APP$/x64"            ], _
	["Folders" , "AdditionsFolder" , "$APP$/GuestAdditions" ], _
	_
	["Folders" , "DataFolder"      , "/Data" ] _
]

Produces the following error:

>Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "D:\Scripts\au3\Portable-Vbox\Portable-VBox.au3"    
D:\Scripts\au3\Portable-Vbox\Portable-VBox.au3 (3) : ==> Missing separator character after keyword.: 
(...)
(...) "$APP$/GuestAdditions" ], _^ ERROR

Attachments (0)

Change History (2)

comment:1 by Valik, 17 years ago

Resolution: Wont Fix
Status: newclosed

I'm closing this as won't fix because I don't think this behavior needs changed. Simple solution? Don't try to include blank lines when using line continuation.

comment:2 by danielkza, 17 years ago

No problem if this is intended behavior. Wasn't sure if it was a parser quirk or a bug.

The (ugly) workaround I found was putting the comma in the empty line, removing it from the previous one.

Thanks anyway.

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.