|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Could someone please post a small, simple macro that results in a scalar, a
> vector, and an array getting passed "out" to the global SDL world?
You can pass them back through the macro arguments by declaring the formal
parameters with the final results. For example:
#macro MyMacro (S, V, A)
#declare S = 1;
#declare V = <2, 3, 4>;
#declare A = array[5]
#for (I, 0, 4)
#declare A[I] = pow (I, 2);
#end
#end
The argument identifiers would need to be declared with dummy values before
passing them to the macro.
Be careful with this technique. It is frowned upon in structured programming,
but without heterogeneous data structure capability, POV-Ray SDL leaves you
little choice.
Post a reply to this message
|
|