General Syntax Rules > Line Continuation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Stefan Schnell
User
User
Posts: 85
Joined: Wed May 07, 2003 2:53 pm
Location: Germany - Oberirsen
Contact:

General Syntax Rules > Line Continuation

Post by Stefan Schnell »

Hello Community,
at the moment it is possible to split long expressions across several lines via the following operators: plus (+), comma (,), or (|), And, Or, Xor.

This is possible:

Code: Select all

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

I suggest to allow the round brackets also as operators for a line break to enable the following:

Code: Select all

MessageRequester(
  "Hello this is a very long title",
  "And a very long message, so we can use the multiline" + #LF$ + Text$,
  #PB_MessageRequester_Ok
)
This improves the readability of the source code and is based on existing standards.

Thanks and best regards
Stefan
Quin
Addict
Addict
Posts: 1127
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: General Syntax Rules > Line Continuation

Post by Quin »

Hello,
I'm assuming you mean parenthesies?
If so, +1 from me.
User avatar
Stefan Schnell
User
User
Posts: 85
Joined: Wed May 07, 2003 2:53 pm
Location: Germany - Oberirsen
Contact:

Re: General Syntax Rules > Line Continuation

Post by Stefan Schnell »

Hello Quin,
yep, I mean parentheses. Thanks for your clarification.
Best regards
Stefan
Post Reply