Problem with Point property

Henning Hasemann hhasemann at web.de
Tue Mar 6 13:47:54 PST 2007


> If you return a pointer, you can still use the . operator, so I think
> foo().point.x;
> should work just fine (both syntactically and semantically)
> 
> However the implication is that if you have a function that takes a 
> point struct object, you either have to change that function to take a 
> point pointer, or dereference the property every time you pass it to 
> functions.

Yeah, I tried this before, but got exactly the described Problem and
didnt wand to change my functions to receive Point* because that
would seem strange and inconsistent.
I'd have to use Point* everywhere maybe but then I could as well make
Point a class I think.

Henning

-- 
v4sw7Yhw4ln0pr7Ock2/3ma7uLw5Xm0l6/7DGKi2e6t6ELNSTVXb7AHIMOen5a2Xs5Mr2g5ACPR hackerkey.com



More information about the Digitalmars-d mailing list