Silly string question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Silly string question

Paul Bleisch
Is there a way to do something like:

MyString = "Some       string"
           "Some other string"
           "Wow, more strings";

Basically, I want to have multiline string literals that don't
automagically add newlines like [[ ]] does.

Thanks,
Paul
--
Paul Bleisch
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Silly string question

Roberto Ierusalimschy
> Is there a way to do something like:
> 
> MyString = "Some       string"
>            "Some other string"
>            "Wow, more strings";

Well, you can use concatenation:

MyString = "Some       string" ..
           "Some other string" ..
           "Wow, more strings";

but you pay a little price (the concatenation is done at run-time). I think
such price is usually negligible.

-- Roberto