C
Chad
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...t&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
And I quote from the following old CLC url
http://groups.google.com/group/comp...t&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