POV-Ray : Newsgroups : povray.bugreports : Macro parameters with the same name : Re: Macro parameters with the same name Server Time
8 Nov 2024 23:03:40 EST (-0500)
  Re: Macro parameters with the same name  
From: Bald Eagle
Date: 23 May 2023 07:10:00
Message: <web.646c9e11399b0b101f9dae3025979125@news.povray.org>
OK - I see it now.

I was thinking in terms of the macro CALL, not the macro "constructor".

So yeah, what you're saying now makes a lot more sense.

I can still se where someone may have some reason to want to do it that way,
especially if the second argument is an optional one, but I don't write computer
languages or parsers...

I will say that it's like a second camera in a scene, so there's still the
potential to issue a "duplicate argument found in macro declaration - ignoring
previous instance"   kind of warning.

But your point is indeed a valid one, and something for macro writers to be
acutely aware of.  (A similar but harder-to-spot error would be having a second
variable declaration later in the scene to overwrite the previous value.  Kind
of the reverse of failing to update a counter in a while loop.)

- BW


Post a reply to this message

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