Better readable formatting for line continuation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 664
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Better readable formatting for line continuation

Post by Kurzer »

Maybe again a Nitpicker request, but if it will not be written down, nobody will take notice of this. ;-)

The line continuation works in such a way that if at the end of a line there is a plus (+), comma (,), Or (|), And, Or, Xor, the line can be wrapped.

This works great, but in the case of And, Or, Xor it would look better if the new line could start with these commands. In most cases, when using this operators, the first line will be a conditional command and the following lines will hold further conditions for this command.

Image

I refer here to the SQL syntax. With this formatting you can recognize the logic of the whole condition more quickly without looking each line up to the end.
Example of SQL syntax:

Code: Select all

Select a.firstname, a.name, a.age, a.debit
From customers a
Where a.name = 'Smith'
  And a.debit > 300
  And a.age between 18 and 39
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2023: 56y
"Happiness is a pet." | "Never run a changing system!"
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Better readable formatting for line continuation

Post by Mistrel »

I agree 100%.

Similar requests:

http://www.purebasic.fr/english/viewtop ... =3&t=66631

and

http://www.purebasic.fr/english/viewtop ... =3&t=61025

More specifically (as related):
http://www.purebasic.fr/english/viewtop ... 36#p514936

Due to the level of verbosity I use, PureBasic has become extremely cumbersome to program with due to my inability to split lines when and where I want to for clarity.

This actually supersedes all of my outstanding feature requests as the greatest frustration I have with PureBasic at this time, as it affects my ability to quickly scan and read my code.
Post Reply