|
|
For beeing in computer programming I think I understand why the parser
works this way, thanks for giving me way to make it work fine, it is the
way every function returning value should be writen anyway, so that's
cool, POV-Ray is actually enforcing good practices. :-)
JC
Warp wrote:
> "JC (Exether)" <no### [at] spamfr> wrote:
>
>>#macro Return_Int (A)
>> #if (A>0)
>> A
>> #else
>> 0
>> #end
>>#end
>
>
> This is a typical place for making a mistake in the SDL syntax (and
> perhaps would reserve an entry in the povQ&T page).
> The right way of doing this is:
>
> #macro Return_Int (A)
> #if (A>0)
> #local retval = A;
> #else
> #local retval = 0;
> #end
> retval
> #end
>
> The reason for this is because how the parser works... But it's a bit
> too complicated for me to explain this late at night. :)
>
Post a reply to this message
|
|