Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > vague lvalue vs...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 25640 of 27670
Post > Topic >>

vague lvalue vs rvalue question

by Chad <cdalten@[EMAIL PROTECTED] > Apr 15, 2008 at 06:23 PM

The following question actually stems from an old Chris Torek post.

And I quote from the following old CLC url

http://groups.google.com/group/comp.lang.c/browse_thread/thread/ce93f8bf3e61aede/cfeed3fda1d0ee46?hl=en&lnk=gst&q=convert+lvalue+to+rvalue#cfeed3fda1d0ee46

"Mathematically speaking, unary `&' and `*' are inverse functions.
Unary `&' takes an lvalue of type `T' and produces an rvalue of
type `pointer to T'; unary `*' takes an rvalue of type `pointer to
T' and produces an lvalue of type `T'.  The <value, type> pairs
from unary `&' must be distinct for distinct lvalues [*], and there
may be only one value produced for any particular lvalue.  This
makes it an invertible function; `*' is then defined as the inverse
function.  While `*' is a well-behaved function on conventional
architectures, all that the language requires is that it be the
inverse of `&'. "

I don't see how one is the inverse of the other. Can someone provide a
concrete example?


Chad
 




 3 Posts in Topic:
vague lvalue vs rvalue question
Chad <cdalten@[EMAIL P  2008-04-15 18:23:15 
Re: vague lvalue vs rvalue question
Jack Klein <jackklein@  2008-04-15 21:42:34 
Re: vague lvalue vs rvalue question
Eric Sosman <esosman@[  2008-04-15 23:38:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 22:09:03 CDT 2008.