Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers, 2nd Edition by Nicholas C Zakas; ISBN: 9780470227800
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 29th, 2010, 12:38 PM
Registered User
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Number conversions - has an omission P35

In the final bullet point on P 35 you state 'if the string contains anything other than these previous formats, it is converted to NaN'

Well what about negative numbers? So "-35" wouldn't return NaN would it?
  #2 (permalink)  
Old October 30th, 2010, 02:30 AM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Negative numbers are identical to their positive counterparts. NaN is literally for things that aren't a number.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
  #3 (permalink)  
Old October 30th, 2010, 07:42 AM
Registered User
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by chroniclemaster1 View Post
Negative numbers are identical to their positive counterparts. NaN is literally for things that aren't a number.
You aren't telling me anything I don't already know here! I was pointing out to the author, the omission of negative numbers in his list of bullet points made the final 'catch-all' statement invalid.
  #4 (permalink)  
Old November 1st, 2010, 07:11 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Yes, you are correct, the wording should be changed. I'll make sure this gets updated.
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL conversions - chapter 7 gorillapoop BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 2 February 15th, 2011 11:02 AM
Error, Strict On disallows implicit conversions f vbGaz VB.NET 2002/2003 Basics 0 January 3rd, 2005 04:27 AM
C# - Decimal to Single type Conversions ubayeed C# 1 December 22nd, 2004 08:48 PM
Type Conversions nikotromus Access VBA 2 October 7th, 2004 06:30 PM
Time conversions from 24hr to am/pm Blaise Classic ASP Basics 2 July 14th, 2003 10:38 PM



All times are GMT -4. The time now is 06:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.