#CRLF$ without the $

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

#CRLF$ without the $

Post by Mistrel »

We have #CR and #LF. Can we please have a native #CRLF?
User avatar
Kiffi
Addict
Addict
Posts: 1486
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: #CRLF$ without the $

Post by Kiffi »

Mistrel wrote:We have #CR and #LF. Can we please have a native #CRLF?
#CR => 13
#LF => 10
#CRLF => ???

1310? 23?

Greetings ... Kiffi
Hygge
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: #CRLF$ without the $

Post by DarkDragon »

Kiffi wrote:
Mistrel wrote:We have #CR and #LF. Can we please have a native #CRLF?
#CR => 13
#LF => 10
#CRLF => ???

1310? 23?

Greetings ... Kiffi
#CRLF = #LF << 8 | #CR, isn't it?

Code: Select all

#CRLF = #LF << 8 | #CR
a.s = #CRLF$
Debug PeekW(@a)
Debug #CRLF
; Try if Chr() works with such constructs which could be misunderstood as unicode characters.
If Chr(#CRLF) = Chr(#CR) + Chr(#LF)
  Debug "Works."
Else
  Debug "Works definately not."
EndIf
But it's true: I can't see any sense in it, because we can't do Chr(#CRLF)
Last edited by DarkDragon on Sun Jan 06, 2008 10:13 am, edited 1 time in total.
bye,
Daniel
User avatar
Kiffi
Addict
Addict
Posts: 1486
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: #CRLF$ without the $

Post by Kiffi »

@DD: What i try to explain is, that IMHO it makes no sense to have a #CRLF

Greetings ... Kiffi
Hygge
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post by pdwyer »

I don't really understand this... ?

it would be 16bit then? Hard to use in a byte array. Not usable like that for unicode either.

I'm not against it, I'm just trying to understand it.
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Post Reply