Page 1 of 1
Compiler defined New Line
Posted: Mon Dec 17, 2007 9:18 am
by Foz
I know I can create a constant that is #NL and depending on OS it assigns Chr(13) + Chr(10) or Chr(13) or Chr(10)...
But I think it would be a nice feature if there was a built in constant for doing this rather than adding it to my own projects every time...
Posted: Mon Dec 17, 2007 11:18 am
by inc.
Just have a look at the Compiler directives.
Written just out of head ...
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
#NL = #CRLF$
CompilerCase #PB_OS_Linux
#NL = #LF$
CompilerCase #PB_OS_MacOS
#NL = #CR$
CompilerEndIf
Posted: Mon Dec 17, 2007 12:58 pm
by milan1612
inc. wrote:Just have a look at the Compiler directives.
Written just out of head ...
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
#NL = #CRLF$
CompilerCase #PB_OS_Linux
#NL = #LF$
CompilerCase #PB_OS_MacOS
#NL = #CR$
CompilerEndIf
Foz already said that this can be done easily, but he wants it build into PureBasic
@Foz: +1
Posted: Mon Dec 17, 2007 6:03 pm
by #NULL
+1
(i think it was requested already)
Posted: Sun Feb 03, 2008 12:19 am
by Foz
Any chance of this getting added to 4.20? Please? Pretty Please?

Posted: Sun Feb 03, 2008 12:24 am
by #NULL
maybe if we send fred some cake

Posted: Sun Feb 03, 2008 10:15 am
by Berikco
#NULL wrote:maybe if we send fred some cake

Send SpaceCake and it will be added

Posted: Sun Feb 03, 2008 8:48 pm
by Mistrel
Or maybe some PureCake.

Posted: Sun Feb 03, 2008 9:12 pm
by Berikco