• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: object.struct.element as lvalue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: object.struct.element as lvalue


  • Subject: Re: object.struct.element as lvalue
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 22 Jan 2013 18:09:01 -0800

On Jan 22, 2013, at 2:51 PM, John McCall <email@hidden> wrote:

> Heh.  And even that is actually incorrect, because you can do things like x.count += 6, which is translated as [x setCount: [x count] + 6] (except only evaluating 'x' once).

Ouch!

>
> I would say that object.struct is a special kind of l-value that's limited in how it can be used.  You can use it as the l-value operand of a simple assignment, compound assignment, increment, or decrement operator, but any other use causes it to be converted to an r-value.

Okay, I'll think of some new wording... :) Thx - m.

--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >object.struct.element as lvalue (From: Matt Neuburg <email@hidden>)
 >Re: object.struct.element as lvalue (From: John McCall <email@hidden>)
 >Re: object.struct.element as lvalue (From: Matt Neuburg <email@hidden>)
 >Re: object.struct.element as lvalue (From: John McCall <email@hidden>)

  • Prev by Date: Re: Best guess at expressing a string as a variable
  • Next by Date: Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
  • Previous by thread: Re: object.struct.element as lvalue
  • Next by thread: Best guess at expressing a string as a variable
  • Index(es):
    • Date
    • Thread