Breaking a long line in the source?

Just starting out? Need help? Post your questions and find answers here.
rotaman
New User
New User
Posts: 5
Joined: Mon Jul 11, 2016 9:19 am

Breaking a long line in the source?

Post 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!
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Breaking a long line in the source?

Post 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)
rotaman
New User
New User
Posts: 5
Joined: Mon Jul 11, 2016 9:19 am

Re: Breaking a long line in the source?

Post by rotaman »

Thanks Dude!
Post Reply