But the question is: what does cr do?

 - Does it write a platform independent newLine?
 - Or does it write a (platform dependent) cr ascii character?

http://www.theasciicode.com.ar/ascii-control-characters/carriage-return-ascii-code-13.html


On Fri, Aug 4, 2017 at 12:50 PM, Jan Vrany <[email protected]> wrote:

> On Fri, 2017-08-04 at 12:03 +0200, Stephane Ducasse wrote:
> > Hi guys
> >
> > While writing pillar code, I ended up using "stream cr" and it
> > worries
> > me to still expand usage
> > of a pattern I would like to remove.
> >
> > Let us imagine that we would like to prepare the migration from cr.
> > I was thinking that we could replace cr invocation by newLine so that
> > after newLine
> > could be redefined as
> >
> > Stream >> newLine
> >        self nextPutAll: OSPlatform current lineEnding
> >
> >
> > what do you think about this approach?
>
> Why not? But please keep #cr.
>
> Section 5.9.4.1 of ANSI reads:
>
> Message: cr
>
> Synopsis
>  Writes an end-of-line sequence to the receiver.
>
> Definition: <puttableStream>
>  A sequence of character objects that constitute the implementation-
>  defined end-of-line sequence is added to the receiver in the same
>  manner as if the message  #nextPutAll: was sent to the receiver with
>  an argument string whose elements are the sequence of characters.
>
> Return Value
>  UNSPECIFIED
> Errors
>  It is erroneous if any element of the end-of-line sequence is an
>  object that does not conform to the receiver's sequence value type .
>
> my 2c,
>
> Jan
>
> >
> > Stef
> >
>
>


-- 



Guille Polito


Research Engineer

French National Center for Scientific Research - *http://www.cnrs.fr*
<http://www.cnrs.fr>



*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13

Reply via email to