Adding a newline to an Array
ducasse
ducasse at iam.unibe.ch
Sun Nov 16 17:40:59 UTC 2003
you can do
ar := Array new: 3
ar at: 1 put: $a.
ar at: 3 put: Character lf.
ou bien
{$a . $b . Character lf}
have fun read a bit the free books around :) Online Free Books at
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html
On Dimanche, nov 16, 2003, at 18:14 Europe/Zurich, Danie Roux wrote:
> Hi,
>
> Bit green to Smalltalk and having trouble with putting a newline
> character in an array:
>
> #($a $b $c) "would give me an array with the three characters a, b and
> c
> in it."
>
> lf := Character lf. " Would give me the lf character "
>
> Now how do I put lf in an array?
>
> #($a $b #lf) " Doesn't seem to work?"
>
> --
> Danie Roux *shuffle* Adore Unix
>
>
>
>
Prof. Dr. Stephane DUCASSE [ | ]
http://www.iam.unibe.ch/~ducasse/
"if you knew today was your last day on earth, what would you
do different? ... especially if, by doing something different,
today might not be your last day on earth" Calvin&Hobbes
Open Source Smalltalks: http://www.squeak.org,
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at
http://www.esug.org/sponsoring/promotionProgram.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1211 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031116/124b3fd6/attachment.bin
More information about the Squeak-dev
mailing list
|