[Implemented] line continuation or line split?
[Implemented] line continuation or line split?
Ok, I saw quite a few requests for this... is it implemented yet? I couldn't find it in the manual. Quite a few requests, but no conclusion.
And, yes, I NEED it for two reasons: a) long & structured array initializations, and b) complex conditional tests with very descriptive var names. Yes, I find it much easier to read the code with it in both of those conditions. For those who don't want it, it's always easy to skip it. for those who need it, it's VERY helpful.
...and I'll even bet that Fred can implement it with only one, maybe two lines of (basic) code.
Thanks Fred!
And, yes, I NEED it for two reasons: a) long & structured array initializations, and b) complex conditional tests with very descriptive var names. Yes, I find it much easier to read the code with it in both of those conditions. For those who don't want it, it's always easy to skip it. for those who need it, it's VERY helpful.
...and I'll even bet that Fred can implement it with only one, maybe two lines of (basic) code.
Thanks Fred!
Re: line continuation or line split?
I'm not so sure this one is high on his list, it has been around for ages I fear.
I can only help here in a limited way. CodeCaddy preprocesses your code and glues 'multilines' together, but it doesn't do includes.
I can only help here in a limited way. CodeCaddy preprocesses your code and glues 'multilines' together, but it doesn't do includes.
( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: line continuation or line split?
It isn't as simple as it seems at first glance and there are a few difficulties that you won't foresee until they start cropping up. Basically there are two approaches: The first is that the source is preprocessed to remove the continuation characters and glue the lines back together before being sent on to the compiler, the second is that the code goes to the compiler "as-is" and the compiler logic expects them and handles them appropriately. My guess is that the second option would appeal most to Fred and I know it presents challenges. I don't believe it's low on the todo list though, my guess would be he wants to implement it sooner rather than later. Just my opinion....and I'll even bet that Fred can implement it with only one, maybe two lines of (basic) code.
BERESHEIT
Re: line continuation or line split?
Well, netmaestro, if a pathethic programmer like me can do it, I'm pretty sure Fred can do it better 

( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: line continuation or line split?
I've played with the same tutorial that Trond played with. With that format, the difference between newlines required and being optional is commenting out a single statement. Maybe PB is a little more intertwined with its code, but if it takes more than a half hour to implement, then I'd consider a whole rewrite using one of the many compiler compilers to make it more maintainable.
It seems a common request...and it never hurts to just ask.
...and blueznl, I did install codecaddy and another plugin (PE Extension) that's supposed to support it, but they both screwed up my formatting. I think they'd likely be great for a new project, but frustrating when you've already got quite a bit of code. I'm trying to avoid plugins right now, too, because I'm planning a win7 upgrade, and every one I use will need double installation. Oh, yeah...I've had the IDE crash twice on me when changing settings, too, so that's another reason to keep to a bare minimum.

It seems a common request...and it never hurts to just ask.
...and blueznl, I did install codecaddy and another plugin (PE Extension) that's supposed to support it, but they both screwed up my formatting. I think they'd likely be great for a new project, but frustrating when you've already got quite a bit of code. I'm trying to avoid plugins right now, too, because I'm planning a win7 upgrade, and every one I use will need double installation. Oh, yeah...I've had the IDE crash twice on me when changing settings, too, so that's another reason to keep to a bare minimum.
Re: line continuation or line split?
You can say that for a lot of other requests.Tenaja wrote:Ok, I saw quite a few requests for this... is it implemented yet? I couldn't find it in the manual. Quite a few requests, but no conclusions
If you wanted just to ask if it was implemented then the right place should have been "Coding questions."
On the other end if you really just wanted to sneak in with a new re-re-re-request this is certainly the way to go, asking innocently about its status inside the "Feature Requests" area.
If is it ok to re-re-re-request then I have some of mine I would like to bump too into a fresh new thread, but I didnt' because I was under the impression Fred doesn't like that, and ultimately this is not MY forum.
Personally I don't see anything wrong in opening a similar or almost identical new request after a year or so, if the thread get a lot of positive replays this is a good indication the request is still desirable by the community. But, again...
About your re-re-re-request, I'm neutral.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: line continuation or line split?
Tenaja, what do you mean with 'screwed up' your formatting? I'm a bit puzzled there... Could you explain to me what went wrong?
( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: line continuation or line split?
It was probably the other plug in, not yours... indentation issues and such.
- Didelphodon
- PureBasic Expert
- Posts: 450
- Joined: Sat Dec 18, 2004 11:56 am
- Location: Vienna - Austria
- Contact:
Re: line continuation or line split?
Go, tell it on the mountains.
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: line continuation or line split?
Thanks, Didel. I've installed it, and it worked nicely on a short demo. Much obliged.
Re: line continuation or line split?
By the way, how do you close all of those pesky Debug windows? In my quick test, they were left floating all over the screen.
Thanks.
Thanks.
Re: line continuation or line split?
Oh! We need to do a feature competition for multi line pre-processors! 


Code: Select all
;
;
a.s = "this is _
a test"
;
b.i = 1 + _
2 + 3
;
c.i = 1 + 2
_ + 3
;
d.i = 1 + _ ; we're almost there...
2 + 3
;
; and what line is the error reported?
;
e = 1 / _
0
;
; that's all folks! :-)
;

( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- Didelphodon
- PureBasic Expert
- Posts: 450
- Joined: Sat Dec 18, 2004 11:56 am
- Location: Vienna - Austria
- Contact:
Re: line continuation or line split?
Debugwindows? When? Where? What?Tenaja wrote:By the way, how do you close all of those pesky Debug windows? In my quick test, they were left floating all over the screen.
Thanks.
Go, tell it on the mountains.
Re: line continuation or line split?
Preferences, default debugger windows.
( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )