Not logged inOpenClonk Forum
Up Topic Using the point operator for function calls in C4Script

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Sven2

> If I do foo->bar(), and bar is a function in a proplist foo, what will be the object context of that call? Does that change if foo is not a proplist but (additionally) an object?


'this' will be foo. Ordinary proplists can also be contexts iirc.

> Also, my opinion is that foo.bar->blubb.gar() should be something meaningful, namely calling the function blubb.gar with the object context foo.bar


That would be nice and would indeed be an application of having the distinct . and -> operators.

You can also just do foo.bar->Call(blubb.gar) right now of course.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill