Got an idea for enhancing PureBasic? New command(s) you'd like to see?
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Thu Dec 08, 2005 9:05 pm
@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++) !
Last edited by
va!n on Sat Dec 10, 2005 4:07 pm, edited 1 time in total.
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
DarkDragon
Addict
Posts: 2344 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Fri Dec 09, 2005 6:03 am
(PureBasic = Basic) And (VisualBasic <> Basic).
IIRC Deeem2031 made a precompiler for this
bye,
Daniel
GeoTrail
Addict
Posts: 2794 Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:
Post
by GeoTrail » Fri Dec 09, 2005 9:30 am
What if you want to add a comment after one of those lines
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Fri Dec 09, 2005 10:21 am
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.
@}--`--,-- A rose by any other name ..
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Fri Dec 09, 2005 10:28 am
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
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Fri Dec 09, 2005 10:31 am
Might also confuse the IDE re the status bar hint.?
.. But ..
nice to have.
@}--`--,-- A rose by any other name ..
benny
Enthusiast
Posts: 465 Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:
Post
by benny » Fri Dec 09, 2005 11:02 am
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:
regards,
benny!
-
pe0ple ar3 str4nge!!!
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Fri Dec 09, 2005 11:20 am
> 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 compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
benny
Enthusiast
Posts: 465 Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:
Post
by benny » Fri Dec 09, 2005 11:48 am
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
regards,
benny!
-
pe0ple ar3 str4nge!!!
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Fri Dec 09, 2005 12:13 pm
> 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Fri Dec 09, 2005 12:51 pm
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?
--Kale
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Fri Dec 09, 2005 12:53 pm
> Personally i like long lines and would never use this 'feature'
That's fine, because it would be optional.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Fri Dec 09, 2005 12:54 pm
PB wrote: That's fine, because it would be optional.
True, but other peoples code would hurt my eyes!
--Kale
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Fri Dec 09, 2005 2:41 pm
you want me to add a converter as well?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Fri Dec 09, 2005 2:59 pm
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.
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,