Page 1 of 3
[Implemented] Will v4 bring us something like line splitting
Posted: Thu Dec 08, 2005 9:05 pm
by va!n
@fred:
hi fred! hope you are fine and things are going still forwards without spending to mutch time in bug hunting and fixing... ^^
btw, will PureBasic support with v4 or somewhere in the future a feature to split one very long formular in multiply lines and joining them like:
Code: Select all
result = ColorR + 1 + ColorG + 2 + ColorB + 3 + ColorA + 4
would be nice if the user can write it somehing like...
Code: Select all
result = ColorR + 1 +
ColorG + 2 +
ColorB + 3 +
ColorA + 4 ; (maybe adding ";" sign where you want end the joining!?)
Maybe it would be possible to use "_" sign at end of a line when wanting join it with the next line... this feature would be very nice (as it would be very usefull for long formulars, like in C/C++) !
Posted: Fri Dec 09, 2005 6:03 am
by DarkDragon
(PureBasic = Basic) And (VisualBasic <> Basic).
IIRC Deeem2031 made a precompiler for this
Posted: Fri Dec 09, 2005 9:30 am
by GeoTrail
What if you want to add a comment after one of those lines

Posted: Fri Dec 09, 2005 10:21 am
by Dare2
For the compiler, split lines would be relatively trivial.
But for the IDE it is a bit more work, given that this is dynamic and etc.
However, it would be really nice, even with VB-ish _ to show line continuation.
PS: Comments just get parsed out.
Posted: Fri Dec 09, 2005 10:28 am
by blueznl
under the new ide this is easy to accomplish, i'll add this option to codecaddy in the next version
it would then do something like:
it would upon compilation time replace the above with one line and two empty lines to avoid error reports on the wrong line
the disadvantage is that it would slow down compilation a little, as i would have to preprocess the source for each and every line
Posted: Fri Dec 09, 2005 10:31 am
by Dare2
Might also confuse the IDE re the status bar hint.?
.. But ..
nice to have.

Posted: Fri Dec 09, 2005 11:02 am
by benny
blueznl wrote:...
the disadvantage is that it would slow down compilation a little, as i would have to preprocess the source for each and every line
Another disadvatange in such precompiler solutions is in my eyes that it
becomes harder to share code between the different IDE's.
In other words, sources coded with the new IDE / codecaddy cannot be run
with jAPBe for example without modifications :roll:
Posted: Fri Dec 09, 2005 11:20 am
by PB
> In other words, sources coded with the new IDE / codecaddy cannot be run
> with jAPBe for example without modifications
Why not? The compiler is what parses the source, not jaPBe...
Posted: Fri Dec 09, 2005 11:48 am
by benny
PB wrote:> In other words, sources coded with the new IDE / codecaddy cannot be run
> with jAPBe for example without modifications
Why not? The compiler is what parses the source, not jaPBe...
I was referring to what blueznl wrote. I understood blueznl in that way that
he wants to code a plugin which parses the source
before compilation
and whenever his plugin found a line which ends with the
"_"-Symbol
it connects the line with the following one.
If I misunderstood blueznl then I am sorry

Posted: Fri Dec 09, 2005 12:13 pm
by PB
> I was referring to what blueznl wrote
Ah, I see. Yes, it would break third-party pre-processors, at least until they
are updated to support it too. But too bad.

Posted: Fri Dec 09, 2005 12:51 pm
by Kale
Personally i like long lines and would never use this 'feature'. I think it looks like a mess and not very 'Pure', but this is just my opinion.
P.S. please NO semicolons (;) on the end of lines, have you any idea of the mess you can get into if you miss just one of these little bas@%£ds out of a C/C++/Java source?

Posted: Fri Dec 09, 2005 12:53 pm
by PB
> Personally i like long lines and would never use this 'feature'
That's fine, because it would be optional.

Posted: Fri Dec 09, 2005 12:54 pm
by Kale
PB wrote:That's fine, because it would be optional.

True, but other peoples code would hurt my eyes!

Posted: Fri Dec 09, 2005 2:41 pm
by blueznl
you want me to add a converter as well?

Posted: Fri Dec 09, 2005 2:59 pm
by va!n
i had some situations where i was very happy when i could split "very long" codelines (algos) in some lines for easier reading instead scrolling a very long horizontal codeline!
ok, we dont must use the ";" sign as end... it was just only a simple idea... so i called the "_" sign as idea, to add this at the end of each line you want to join...
sill looking forward and still hopping that one day this feature will be available in PureBasic too... it has nothing to do with C,C++,VB... its just a general issue.