Litteral arrays parsing

Bert Freudenberg bert at impara.de
Tue May 23 16:59:28 UTC 2006


Am 23.05.2006 um 16:42 schrieb Noury Bouraqadi:

> Hi,
>
> A stupid question, why evaluating
> #("comment") leads to an empty array instead of an array with a  
> single element #'"comment"'?

Because a comment is parsed as whitespace, not as token.

> I guess that this is somehow bound to the fact that
> #"comment"
> evaluates to a symbol with a single hidden character (Ascii 30)

No, that's because Ascii 30 signifies the end of input (see  
Scanner>>step). It's the same as if you just evaluate a single #  
character.

- Bert -




More information about the Squeak-dev mailing list