Strings
Martin Drautzburg
martin.drautzburg at web.de
Sun Apr 21 22:55:57 UTC 2002
jennyw <jennyw at dangerousideas.com> writes:
> Nontheless, it kind of spooked me to learn that if an instance variable
> received its value from a string literal (e.g. via an accessor or in
> initialization) that the value of that variable could change if someone
> typed something like 'string' at: 1 put: $x.
>
> Any comments?
>
> Thanks!
>
> Jen
I hope I pushed the right buttons. Here's what I get:
>From The Workspace
|A|
A := 'squeak'.
'squeak' At: 6 Put: $l.
Transcript Show: A; Cr
It Prints
In Smalltalk/X: "Squeak"
In Squeak: "Squeal"
In Visualage I Get A PrimitiveError
More information about the Squeak-dev
mailing list
|