Re[2]: explicit line termination with ;: why?

2007-05-14 Thread Andrew Shitov
 JavaScript allows to omit semicolumn.

Sorry, s/lumn/lon/.

By the way, Perl also ignors semicolumn :-)



--
Andrew Shitov
__
[EMAIL PROTECTED] | http://www.shitov.ru



Re[2]: explicit line termination with ;: why?

2007-05-14 Thread Andrew Shitov
 Aankhen wrote:

 Speaking of JavaScript, any experienced JavaScript programmer will
 tell you that while semi-colons are in fact optional, you should
 always treat them as mandatory, to avoid subtle errors creeping into
 your code.

We should also note that the idea of omitting ';' is not as simple as
\n always means ;\n. In mentioned JavaScript language one can
do this:

script
var
x
=
123
alert
(
x
)
/script

and that will work!

;\n can almost always be converted into \n but not vice versa.


--
Andrew Shitov
__
[EMAIL PROTECTED] | http://www.shitov.ru