#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 Changed 15 years ago by Valik
- Resolution set to Wont Fix
- Status changed from new to closed
comment:2 Changed 15 years ago by danielkza
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.
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.
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.