[Implemented] Long Line Split
[Implemented] Long Line Split
It would be nice to have in PB a way to split a long command line in multile lines like the &_ in VB
Re: Long Line Split
It's been requested MANY times.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
I tend to use it now and again, mostly when figuring something out. I tend to rarely use it in real life programming, I admit.
(And yes, CodeCaddy has the same problem, it does not do includes... I'm still hoping for a good spot to slot in pre-processors...)
(And yes, CodeCaddy has the same problem, it does not do includes... I'm still hoping for a good spot to slot in pre-processors...)
( 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... )
Aaahhhhh... I just figured out how to do includes... read the original source, and as we're preparsing it anyway, take out any include paths and replace them with paths to a new includes that we also pre-process(ed). Unfortunately I do not think that would be very fast though... duh 

( 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... )
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Yes, of course. I'll just make necessary adjustments for PB 4.30 (and maybe some minor tweaks) first.reisve wrote:Little John, Can you post your tool in the English forums?
2blueznl:
I've thought of that, too. But then the program also has to take care itself of things like #PB_Compiler_Home and such, right?
Regards, Little John
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
For strings there is an easy workaround, I think:infratec wrote:only to push it up in the list![]()
Because it's not nice to write a usage messagerequester with several chr(13) in one line.
Code: Select all
msg$ = "First line" + #CRLF$
msg$ + "Second line" + #CRLF$
msg$ + "Third line"
MessageRequester("Read this", msg$)
Apart from that, I'd also appreciate it if Purebasic would support line continuation natively.
Regards, Little John
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
//edited:Mistrel wrote:Just out of curiosity can anyone name a language which does not use an end of line character and allows multiple lines of text across several lines?
E.g. Lua does allow that:
We can delimit literal strings also by matching double square brackets [[...]]. Literals in this bracketed form may run for several lines, may nest, and do not interpret escape sequences. Moreover, this form ignores the first character of the string when this character is a newline. This form is especially convenient for writing strings that contain program pieces; for instance,
Code: Select all
page = [[
<HTML>
<HEAD>
<TITLE>An HTML Page</TITLE>
</HEAD>
<BODY>
<A HREF="http://www.lua.org">Lua</A>
[[a text between double brackets]]
</BODY>
</HTML>
]]
write(page)
Regards, Little John
Re: Long Line Split
I'd like to add my name to the list of folks requesting it. As has also been stated many times before, the old VB method of using space-underscore is fine with me, particularly if it allows comment characters and comments on the lines (for tutorial code, or note-to-self code, which I frequently write).PB wrote:It's been requested MANY times.
I looked through the forum search results for "line continuation" and "line split" and I noticed one point that either never got made or I missed it somewhere in the jumble: being able to format lines that way makes it easier for columnists/bloggers to write about your language and include sample source code that is readable in the small confines of an article column but that can also be copied, pasted, and compiled without editing. Make life easier for PB writers and PB readers and you make it more likely they will write and read about PB at all.
A small point, perhaps, but a point nevertheless.
PB 4.41 - PSPad 4.5.4 - WinXP Home SP3
http://programmingforfun.net
http://programmingforfun.net