POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 14:27:05 EDT (-0400)
  Re: Function parameter bug  
From: Thorsten Froehlich
Date: 27 Oct 2001 06:06:07
Message: <3bda870f@news.povray.org>
In article <3bda83a9$1@news.povray.org> , "Rune" 
<run### [at] mobilixnetdk> wrote:

> When you *call* functions, not when you initiate them! At least it shouldn't
> be since it makes no sense at all.
>
> Take a macro:
>
> #declare V = 0.1:
> #macro MyMacro(V) V*2 #end
> sphere {x, 0.1}
>
> Here's there's no problem since the parameter in the macro doesn't conflict
> with already declared variables. You can still call the macro with the
> declared variable and *then* it will be used:
>
> #declare B = MyMacro(V);
>
> But with functions a conflict happens at the time of declaring the function
> and that's all wrong.

Repeat after we:

Functions are not macros.  Functions are not macros.  Functions are not
macros.  Functions are not macros.   Functions are not macros. ...

    Thorsten

____________________________________________________
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.