POV-Ray : Newsgroups : povray.pov4.discussion.general : Request: collapsible code blocks : Re: Request: collapsible code blocks Server Time
29 Apr 2024 08:05:25 EDT (-0400)
  Re: Request: collapsible code blocks  
From: How Camp
Date: 11 Jul 2008 09:30:00
Message: <web.48775f8ea7b34a59c59235590@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> In POV SDL you can overlap or intersect blocks. For instance something like the
> following code would be valid:
>
> pigment
> {
>   #if (true)
>     color rgb x
>     }
>   #else
>     color rgb y
>     }
>   #end


Valid, yes... but collapsible code blocks might actually encourage better coding
behavior.  In your example, the preferred alternative is obvious:

pigment
{
  #if (true)
    color rgb x
  #else
    color rgb y
  #end
}

I can't really think of a valid circumstance where the 'looser' form is
necessary (or advantageous)...


Post a reply to this message

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