https://bugs.winehq.org/show_bug.cgi?id=56480
Bug ID: 56480 Summary: vbscript: underscore line continue issues Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: francisdb@gmail.com Distribution: ---
cat test.vbs
Class Tween Public Function Delay(length) Set Delay = Me WScript.Echo "Delay " & length End Function
Public Function Clear() Set Clear = Me WScript.Echo "Clear" End Function End Class
Dim instance Set instance = new Tween
WScript.Echo "chained"
instance.Clear().Delay(1)
WScript.Echo "chained with continuation dots after" ' works as expected instance. _ Clear(). _ Delay(1)
WScript.Echo "chained with continuation dots before" ' 0114:fixme:wscript:ActiveScriptSite_OnScriptError instance.Clear() _ .Delay(1)
WScript.Echo "chained with continuation dots before2" ' 0114:fixme:wscript:run_script ParseScriptText failed: 80004005 instance _ .Clear() _ .Delay(1)
WScript.Echo "done"
--
Linux Wine.
wine cscript test.vbs
0114:fixme:vbscript:parser_error L".Delay(1)\n\nWScript.Echo "done"\n": "syntax error" 0114:fixme:wscript:ActiveScriptSite_OnScriptError () 0114:fixme:wscript:run_script ParseScriptText failed: 80004005
--
Windows cscript
cscript test.vbs
Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.
chained Clear Delay 1 chained with continuation dots after Clear Delay 1 chained with continuation dots before Clear Delay 1 chained with continuation dots before2 Clear Delay 1 done
--
Some more notes: * On wine by commenting out the last section you get a different error * I have also seen different errors depending on weather the functions called have arguments or not * Other uses of underscore do seem to work. Eg multiline Dim, multiline if.