[squeak-dev] Legitimate syntax for # ... foo

Hans-Martin Mosner hmm at heeg.de
Thu Apr 29 18:32:02 UTC 2010


Am 29.04.2010 18:15, schrieb Igor Stasenko:
> # "helllooo" foo
>
> prints
> #foo
>
> is this correct?
>
>   
That depends on the definition of "correct".
Scanner allows any separator (which is whitespace or comment) between #
and the following stuff. So
#



foo
would also print #foo.

The various syntax diagrams you will find generously omit whitespace
handling, so it is probably left to the implementor to decide whether
whitespace is acceptable after the leading #.
I would prefer if if wasn't.

Cheers,
Hans-Martin



More information about the Squeak-dev mailing list