Amazon.com Widgets Page 66 - method arguments...(maybe)
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 29, 2014, 02:36:23 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Errata
| | |-+ 5th printing
| | | |-+ Page 66 - method arguments...(maybe)
Pages: [1] Go Down
Print
Author Topic: Page 66 - method arguments...(maybe) (Read 843 times)
davej
Newbie
*
Posts: 9






on: May 04, 2009, 03:23:15 PM

Think I found another one:

When I was reading through program example 4.6 at first I thought the multiply argument of "5" in the "main" section should have been "5.0" but then I got to the paragraph immediate following the program example and saw that it was intentional. I must admit, I was quite happy with myself for catching that one.

I did, however, notice that just above the multiply method, when the add method is called it is printed:

   [deskCalc add: 200.];

You clearly explain about how numeric arguments are automatically converted to match the type expected by the method, so I know that it works just fine, but given the way the rest of the program is printed should it not be:

   [deskCalc add: 200.0];

Is the omission of the "0" after the decimal intentional? If so, is there a reason?

Not sure if this one is an error or not, but thought I would mention it.

--Dave

P.S. I feel like I sound really critical pointing out little typos, and I would hate to offend, or give the impression that I am anything other than completely in awe of your book. I figure you would want to know to make corrections to any further editions that may come out down the line. No? Should I keep pointing any typos if I find them or is it just adding tedious work for you in the form of more posts to read through?
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







Reply #1 on: May 04, 2009, 03:59:44 PM

Dave,

For readability, you're right the 0 should be there.  However, realize that the number 200. is a floating point number.  The decimal point makes it a floating point constant.

Cheers,

Steve Kochan
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.