|
 |
On 5/22/21 6:14 PM, Tor Olav Kristensen wrote:
> "Bald Eagle" <cre### [at] netscape net> wrote:
...
>
> I'll have a look at the code you have made so far to see if we are on the same
> track.
>
...
FWIW. There is some type checking available via POV-Ray's fixed arrays.
For example, a method to keep all subsequent array types the same as the
first seen, when passed a mixed array, the Mean() macro would become:
#macro Mean(Values)
#local N = dimension_size(Values, 1);
// #local Sum = Values[0];
#local Sum = array[1]
#local Sum[0] = Values[0];
#for (I, 1, N - 1)
#local Sum[0] = Sum[0] + Values[I];
#end // for
(Sum[0]/N)
#end // macro Mean
On changes in type for the incoming mixed array 'Values' you'd get
messages like:
File 'dimsize.inc' line 52:
Parse Error:
Attempted to redefine float identifier as uv vector identifier.
Bill P.
Post a reply to this message
|
 |