[Javascript] RE: semicolon;

Paul Novitski paul at novitskisoftware.com
Fri Jun 25 11:33:39 CDT 2004


At 11:20 AM 6/24/2004, Edward Tisdale wrote:
>And this great use of a semicolon is not available in
>Visual Basic. What does one do in this case?


Visual Basic uses either the carriage return or the colon as a statement 
delimiter, and can split statements across multiple lines with the underscore:

         h = 0:
         i = 1
         j = 2: k = _
         3

compared to JavaScript, which uses either the carriage return or the 
semi-colon as a statement delimiter, and can split statements across 
multiple lines with the carriage return:

         h = 0;
         i = 1
         j = 2; k =
         3

As you can see, Visual Basic is quite explicit, and doesn't share 
JavaScript's ambiguity of the use of a carriage return as statement delimiter.

Paul  





More information about the Javascript mailing list