|
![](/i/fill.gif) |
In article <40394cee@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Christopher James Huff <cja### [at] earthlink net> wrote:
> > > Int foo = container.size(); // <- gets a *reference*
>
> > No, that initializes an Int named foo to the object returned by
> > container.size. Not a problem.
>
> And what if you *do* want a reference to the member variable?
> You can't?
No...then you declare a reference to it. For example, Sapphire has two
forms of the syntax for declaring variables:
def foo: bar; //declares foo as a reference to bar
def foo = bar; //declares foo as a reference to a copy of bar
> > You could also introduce const references...not sure if its worth the
> > trouble.
>
> I think they are useful, as I mentioned above.
> Don't know what would be a practical syntax, though.
And it does complicate the language. Remember that this is a scene
description language...
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |