POV-Ray : Newsgroups : povray.beta-test : namespace issue : Re: namespace issue Server Time
29 Jul 2024 10:21:38 EDT (-0400)
  Re: namespace issue  
From: Rune
Date: 27 May 2002 10:11:41
Message: <3cf23e9d@news.povray.org>
Thorsten Froehlich wrote:
> Well, #declares and #macros are processed first, that
> is why they can be inserted everywhere with very few
> restrictions.  The parser cannot know something has
> been subsituted by either a macro or a declared value
> because that is exactly the point of these directives.

But macro parameters don't interfere with #declared variables. What is
it that makes it impossible to make function parameters work the same
way as macro parameters?

This works fine:

#declare C = 0;

#macro Macro (C) C+1 #end

You don't get an error saying, "Expected 'parameter identifier', float
function 'float identifier' found instead".

But this doesn't work:

#declare C = 0;

#declare Function = function(C){C+1}

Here you get the error, "Expected 'parameter identifier', float function
'float identifier' found instead".

I know that functions are not macros, but that in itself is not an
excuse to make something less userfriendly than it could be. Do we agree
that if it wasn't for some internal limitation, it would be optimal if
function parameters could work similarly to macro parameters? If we do
not agree on that, then I probably have misunderstood you...

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated May 20)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

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