Page 1 of 1

Breaking a long line in the source?

Posted: Fri Jul 15, 2016 11:10 am
by rotaman
I know about #CRLF$ but that's for output. Is there any way to break a long line in the source code? I can't find anything in the user guide.
Thanks in advance!

Re: Breaking a long line in the source?

Posted: Fri Jul 15, 2016 11:19 am
by Dude
rotaman wrote:Is there any way to break a long line in the source code? I can't find anything in the user guide.
It's under "General Rules" for line continuation:

https://www.purebasic.com/documentation ... rules.html

Just end the line with a plus (+), comma (,), or (|), And, Or, Xor.

Example from that page:

Code: Select all

Text$ = "Very very very very long text" + #LF$ +
        "another long text" + #LF$ +
        " and the end of the long text"

MessageRequester("Hello this is a very long title",
                 "And a very long message, so we can use the multiline" + #LF$ + Text$,
                 #PB_MessageRequester_Ok)

Re: Breaking a long line in the source?

Posted: Fri Jul 15, 2016 1:39 pm
by rotaman
Thanks Dude!