POV-Ray : Newsgroups : povray.bugreports : unexpected evaluation of #if(...)? : Re: unexpected evaluation of #if(...)? Server Time
14 Mar 2025 08:05:49 EDT (-0400)
  Re: unexpected evaluation of #if(...)?  
From: ingo
Date: 8 Mar 2025 06:35:00
Message: <web.67cc2b3e29b385b717bac71e8ffb8ce3@news.povray.org>
kurtz le pirate <kur### [at] freefr> wrote:

> So, splitting conditions seems to be the only solution with POV.

But not always straight forward,

#if (Z > 0 & VoxelGrid[X][Y][Z-1] > 0)
  .....
#else
  .....
#end

after splitting #else may not be reached, where it is in the original (VoxelGrid
= 0).

#if (Z > 0)
  #if (VoxelGrid[X][Y][Z-1] > 0)
    ....
  #end
#else
  ....
#end

it needs some thought and the code is way more complex than this. (#switch #case
can be an alternative after turning the conditions into "states")


ingo


Post a reply to this message

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