Legitimate syntax for # ... foo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Legitimate syntax for # ... foo

Igor Stasenko
# "helllooo" foo

prints
#foo

is this correct?

--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: Legitimate syntax for # ... foo

Hans-Martin Mosner
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