(with reference to my post in povray.advanced-users)
This file demonstrates a way in which a variable can store a reference to a
macro. And this variable can be used to indirectly invoke that macro. This is
equivalent to function callbacks in C, or class methods in C++.
It can be pretty handy if you want to define a lot of different macros with the
same interface, and call them from code which is independant of the macros
themselves.
Let me know if this is any good! :)
--
Tek
www.evilsuperbrain.com
P.S. sorry for the double-post, I've been quite productive this evening!
Post a reply to this message
Attachments:
Download 'scratchfile.inc.txt' (1 KB)
Download 'scratchfiletest.pov.txt' (2 KB)
|