These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

Unsigned/Signed positive integers.

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Unsigned/Signed positive integers.

Postby IMarvinTPA » Fri Jul 20, 2007 2:01 pm

In section 3.2.3 Numbers, why can't positive numbers have an optional plus sign (+) prefixed to the string?

IMarv
IMarvinTPA
<h6>
 
Posts: 3
Joined: Fri Jul 20, 2007 1:58 pm

I agree

Postby fprog » Sat Jul 21, 2007 3:03 am

I second this.

Also, "+10" = " +10 " = 10, plus should be ignored...
parseInt("+10") == 10

javascript:alert( parseInt("+10") ); == 10

javascript doesn't like trimming spaces between + and 10 tough

javascript:alert( parseInt("+ 10") ); == NaN

but

javascript:alert( parseInt(" +10 ") ); == 10
fprog
<h5>
 
Posts: 11
Joined: Tue Jun 05, 2007 12:41 am

Postby zcorpan » Sun Oct 21, 2007 2:49 pm

What's the use case?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest