_ works to split a long line into multiple line in VBSCript. Wondering if it works for QTP as well
Asked
Active
Viewed 2,461 times
-2
-
I don't know UFT but if it uses vbscript then it supports vbscript line continuation. It takes 2 minutes to add vbscript macros to any script/program (so a jscript/vbscript can host a vbscript/jscript macro language). In Windows Internet Explorer and Windows Scripting Host host vbscript and they, and any other program hosting vbscript, use c:\windows\system32\vbscript.dll to implement the language. Line continuation is part of the VBA standard that VBScript is based on. It's not optional. – Sep 22 '16 at 23:14
-
2I'm downvoting this because the answer could be easily [found on google](https://www.google.com.br/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=qtp%20line%20continuation) – Victor Moraes Sep 23 '16 at 11:27
1 Answers
4
Use & _ for break your long lines.
sString = "Something very long " & _
"More on that" & _
"A little more"
Reference is here

ramkumar-yoganathan
- 1,918
- 3
- 13
- 29
-
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/13766523) – techspider Sep 23 '16 at 16:59
-
Thank you for pointing out. Next time, I will be very much careful. – ramkumar-yoganathan Sep 26 '16 at 09:12