POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 20:17:40 EDT (-0400)
  Re: Function parameter bug  
From: Thorsten Froehlich
Date: 27 Oct 2001 09:59:09
Message: <3bdabdad@news.povray.org>
In article <3bdab763@news.povray.org> , "Rune" <run### [at] mobilixnetdk>
wrote:

> Thorsten, it's not that I don't understand how function parameters work,
> what I don't understand is why they're designed to work that way.

Because POV-Ray directives are designed to work this way.  They sit "on top"
of your scene.  Contrary to macros functions are _part_of_the_scene_ and as
such are and have to be handled different from macros.

Would you expect the scene below to work as well? - It would be a
consequence of what you are asking for (as I explained above) and obviously
does not make sense!

    #declare foo = function(a,b,c)
    {
        #while(a > 0)
            (b - a) *
            #declare a = a - 1;
        #end
        c
    }


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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