POV-Ray : Newsgroups : povray.general : Request for Syntax Suggestions : Re: Request for Syntax Suggestions Server Time
7 May 2024 10:16:17 EDT (-0400)
  Re: Request for Syntax Suggestions  
From: Le Forgeron
Date: 23 Apr 2016 02:19:18
Message: <571b13e6$1@news.povray.org>
Le 23/04/2016 05:57, clipka a écrit :
>     #declare MyFn1 = function(x,y,z) { ... }
>     #declare MyFn2 = function(x,y,z) { ... }
>     ...
>     #declare MyFnN = function(x,y,z) { ... }
> 
>     #declare MyFn = function {
>         MyFn1(x,y,z bounded_by{box{ ... }}) +
>         MyFn2(x,y,z bounded_by{box{ ... }}) +
>         ...
>         MyFnN(x,y,z bounded_by{box{ ... }})
>     }
> 
> except that this particular syntax would neither be reasonably easy to
> parse, nor do I consider it reasonably pretty.

Could you move the bounded_by in the initial declare ?
(well, it might be something else than function as we know it)


    #declare MyFn1 = bounded_function(x,y,z) { ... bounded_by{box{ ... }}}
    #declare MyFn2 = bounded_function(x,y,z) { ... bounded_by{box{ ... }}}
    ...
    #declare MyFnN = bounded_function(x,y,z) { ... bounded_by{box{ ... }}}

    #declare MyFn = function {
        MyFn1(x,y,z) +
        MyFn2(x,y,z) +
        ...
        MyFnN(x,y,z)
    }

Now, I suck at naming, so go find a better keyword than "bounded_function".
(better: easy to spell, as short as possible, easy to remember, meaningful.)


Post a reply to this message

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