Amazon.com Widgets Dot Operator
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 19, 2013, 09:34:48 PM
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
|-+  Programming in Objective-C, 4th edition
| |-+  Chapter 7
| | |-+  Dot Operator
Pages: [1]   Go Down
Print
Author Topic: Dot Operator  (Read 391 times)
donjeong
Newbie
*
Posts: 4






« on: July 19, 2012, 11:52:09 AM »

As I know, Dot Operator is expected to be used to access properties.
But, when I change [myFraction print] to myFraction.print, no error occurs in compile time and run time.
How is this syntactically correct?
Logged
kefka
Newbie
*
Posts: 14


Email




« Reply #1 on: July 24, 2012, 02:57:29 PM »

Hi Donjeong,

As I understand it, no error should occur. It is syntactically correct - meaning the code is perfectly valid and will work. However, according to Steven, it is not good programming style.He also notes that it will work only with methods which you manually write. There is a note at the bottom of page 231 just after that section which explains as much.

Hope I explained it right!

Regards

Daniel
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.