POV-Ray : Newsgroups : povray.windows : Matching braces, brackets and parentheses Server Time
18 Jul 2024 15:23:38 EDT (-0400)
  Matching braces, brackets and parentheses (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: Matching braces, brackets and parentheses
Date: 11 Aug 2000 06:31:38
Message: <3993d60a@news.povray.org>
Bob Hughes <per### [at] aolcom?subject=pov-news:> wrote:
: Well throw in a few directives like #if #switch #while and the rest, along
: with more of the possible keywords, and you might start losing sight of
: those neatly ordered braces  :-)

  Those can be indented as well.
  Right, there are no braces with #-commands, but still I haven't had any
problem with them

union
{
    #declare IndX = 0;
    #while(IndX < 100)
        #declare IndY = 0;
        #while(IndY < 100)

            sphere { <IndX, IndY, 0>, .1 }

            #declare IndY = IndY+.1;
        #end
        #declare IndX = IndX+.1;
    #end

    pigment { rgb x }
}

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Fabien Hénon
Subject: Re: Matching braces, brackets and parentheses
Date: 11 Aug 2000 19:09:04
Message: <399487D9.2CA3BD41@club-internet.fr>
I try to keep scripts as clean and tidy as yours, but what I meant is that it would be
a nice add-on for the coming version of POV. ( win or other)
But I just don't have a clue if it will require a lot of work or not.





> : Well, I do use indentation a lot, but when you get material { texture { ... down
> : to a color_map mixed with other normal_map, there's bound to be an error.
>
>   Again: A proper indentation should help.
>
> material
> {
>     texture
>     {
>         pigment
>         {
>             onion color_map
>             {
>                 [0 rgb 0]
>                 [1 rgbf 1]
>             }
>             turbulence .5
>         }
>         finish
>         {
>             specular .5 roughness .05
>         }
>     }
>
>     interior
>     {
>         ior 1.5
>     }
> }
>
>   At least I can distinguish quite well matching parentheses there.
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Halbert
Subject: Re: Matching braces, brackets and parentheses
Date: 11 Aug 2000 23:42:59
Message: <3994c7c3@news.povray.org>
Thanks for the tip regarding the tabs. Amazing how much the "little things"
make a difference.
HH


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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