POV-Ray : Newsgroups : povray.advanced-users : Bitwise operators corrupting SDL parse-time execution of POV-Ray? : Re: Bitwise operators corrupting SDL parse-time execution of POV-Ray? Server Time
19 Apr 2024 19:14:00 EDT (-0400)
  Re: Bitwise operators corrupting SDL parse-time execution of POV-Ray?  
From: Cousin Ricky
Date: 3 Feb 2023 18:43:34
Message: <63dd9c26$1@news.povray.org>
On 2023-02-03 18:33 (-4), Bald Eagle wrote:
> 
> I tried to run a loop to process a series of input values, but my loop only
> executed one iteration.
> 
> I then sent the value of my iterator to the #debug stream after the loop exited,
> and it's greater than my maximum/exit value!

If you pass an identifier as a macro argument, POV-Ray treats it as
pass-by-reference.  Macro SuperFastHash() makes assignments to its
arguments, data and len.  This hoses your loop counter i during the
first call to SuperFastHash().

You can fix this by assigning data and len to new local variables within
SuperFastHash(), and using only those new variables.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.