|
First,in the first assignment( x = y), x,y have the same type. in the second( *x=y), x is a pointer which point to the object with the same type as y(for mike:).
The more I saw you guys' discussion, the more I am convinced that I am right, i.e. *x=y means put l(y) in l(x), which means setting r(x) equal to l(y)(for Torkiat). Ok, if Jake is right, i.e., " you can't put l(y) into l(x) because you can't store an lvalue directly into another location", then I am done. No question. But as my understanding, l value is a location or name of location, r value is stuff stored in location. l value can be still stored in some other location, actually it is what pointer means. By saying *x = y, we means x is a location, it(l(x)) stores the location name of y(l(y)) after this assignment. (r(x) = l(y)). Let's put in another way, *x=y equals to saying x = &y, put r(&y) in l(x), what is r(&y)? l(y) as far as can see. Sorry if I seem to be too stubborn.
|
think about what a pointer means?? by Michael C. Brizic, 2000, Nov 08
You didn't understand me by Torkiat Krutpum, 2000, Nov 09
to: