Re: JavaScript Integer Validation - Leading zeros

2005-02-17 Thread snekse
Although JavaScript is not Java, the language designers adopted the same syntax for integer literals that is found in Java (and C/C++/C#) ... integer literals with a leading 0 are interpreted to be octal literals, unless they start with 0x or 0X to indicate hexadecimal literals. Craig If

RE: JavaScript Integer Validation - Leading zeros

2005-02-16 Thread Slattery, Tim - BLS
What I don't understand is why it does this. Why does the JS validation differ from the Java validation? JavaScript is NOT Java!! They have confusingly similar names, but they are totally different. There's no reason to expect that the performance of one should be similar to the performance

Re: JavaScript Integer Validation - Leading zeros

2005-02-16 Thread Hubert Rabago
I think I remember reading somewhere that the Validator plugin enforces these validations as a rule, which means the behavior should be consistent between their JS as well as Java validation codes. They do this to match what the Java compiler accepts, which IMO is strange since the validation

Re: JavaScript Integer Validation - Leading zeros

2005-02-16 Thread Craig McClanahan
On Wed, 16 Feb 2005 14:19:15 -0500, Slattery, Tim - BLS [EMAIL PROTECTED] wrote: What I don't understand is why it does this. Why does the JS validation differ from the Java validation? JavaScript is NOT Java!! They have confusingly similar names, but they are totally different. There's