View Single Post
  #1 (permalink)  
Old November 10th, 2004, 03:25 PM
Doldrums Doldrums is offline
Registered User
 
Join Date: Nov 2004
Location: , KS, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Doldrums Send a message via AIM to Doldrums Send a message via MSN to Doldrums Send a message via Yahoo to Doldrums
Default Multiline Strings

What is the most optimized way to write a very long string literal? Take the following for an example.

If I have:

Dim S As String
S = "This is a long line of text that I would really like to break up on multiple lines"


Would it be best to do this:

S = "This is a long line of text " + _
    "that I would really like to " + _
    "break up on multiple lines"


Or this:

S = "This is a long line of text "
S += "that I would really like to "
S += "break up on multiple lines"


Or this:

S = "This is a long line of text "
S &= "that I would really like to "
S &= "break up on multiple lines"


Or, do all of these examples create 3 strings and destroy 2?

Thanks,

Doldrums