Re: Does VBscript support " & _" for long strings?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Another thought:

This is just a matter of taste, but personally
I think it's cleaner, safer and easier to read
if it's done as a multiple concatenation:

s = "abc" & vbcrlf
s = s & "def" & vbcrlf
s = s & "ghi"
etc...

Ah! Thank you - my Copy and Paste may have done me in, then. I will look
for that.
Ed

"Alexander Mueller" <millerax@xxxxxxxxxxx> wrote in message
news:u2Ric8jOHHA.2312@xxxxxxxxxxxxxxxxxxxxxxx
Ed schrieb:

"Michael Harris (MVP)" <mikhar.at.mvps.dot.org> wrote in message
news:%23ssqL4cOHHA.140@xxxxxxxxxxxxxxxxxxxxxxx
Ed wrote:
I know in Word and Excel VBA macros, I can set a long string using
& vbCrLf & _
to continue the string on the next line. I seem to be getting an
error in a script using this. Then again, it may well be something
else. So I thought I'd check on this while I look over everything
else just to make sure this is okay in scripting.

Thanks.
Ed
Yes - _ as a line continuation character is supported in VBScript.


Thanks, Michael. At least now I know to look elsewhere for my
problems..
8>0

Not that a trailing ' _' is legal in vb(a) but not in vbs.

msgbox "hello" _


MfG,
Alex




.



Relevant Pages

  • Re: setuid script
    ... Safer than what...? ... Use sudo and a script that sets up the environment appropriately ... Then you add an entry in /etc/sudoers that allows you to sudo to the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Dynamic loading of javascript files into web pages
    ... Steve says the technique is "safer". ... It is less safe because of the use ... than a <script> tag? ...
    (comp.lang.javascript)
  • Re: basic output question
    ... John Deas wrote: ... I want to call the script with arguments, ... Not only is this safer, it is also safer, because it will throw an error early if you feed it something other than an int. ...
    (comp.lang.python)
  • Re: [SLE] Pullin my hair out... arrrgh
    ... >> one has to then kill a bunch of pids for older executions of the same ... >> Is there a cleaner way of doing this? ... since it continues to work even if the script gets moved/renamed and I forget ... This is assuming the use of a shell that puts the command in $0, ...
    (SuSE)
  • Re: Windows 7 - AppData
    ... Die Datenträgerbereinigung verwenden und keine Cleaner installieren. ... Wen der Cleaner nicht für's Putzen der Registry eingesetzt is es m.E. ... nicht mehr erforderliche Dateien in Windows löschen. ... Schau dir mal folgendes Script an: ...
    (microsoft.public.de.windows.vista.dateisystem)