[Newbies] \n equivalent?
Bert Freudenberg
bert at freudenbergs.de
Sun Aug 2 21:51:42 UTC 2009
On 02.08.2009, at 23:20, Paul DeBruicker wrote:
> So
> 'Character cr asciiValue' is 13
> 'Character lf asciiValue' is 10
>
> and ascii value of the \n character in Python is
>
>>>> ord('\n')
> 10
>
>
> So I want to use 'String lf' inplace of a \n in Python during string
> concatenation.
#lf is rarely used in Squeak code. Typically we use #cr. E.g., if you
want a line break while writing to the Transcript you would send #cr.
Same if you want a line break in a text file. Rather than switching
between #cr, #lf, and #crlf depending on the platform being a Mac,
Unix, or Windows, we only use #cr and rather set the stream to the
right line end conversion method.
- Bert -
More information about the Beginners
mailing list