|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
POV 3.5 b 9 on PII 233 128 MB with NT 4 Sp 6
I'm surprised below doesn't work:
#declare C=function{x+y+z};
#declare C=10;
#declare C=function{x+y+z};
Parse Error: Attempted to redefine float identifier as function_id.
#declare C=function{x+y+z};
#declare C=array[10];
#declare C=function{x+y+z};
Parse Error: Attempted to redefine array identifier as function_id.
#declare C=function{x+y+z};
#declare C="S";
#declare C=function{x+y+z};
Parse Error: Attempted to redefine string identifier as function_id.
but below works fine
#declare C=function{x+y+z};
#declare C=function{x};
#declare C=function{x+y+z};
Is it temporary workaround of some bug or final solution? If final then there
isn't any note about it in documentation.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Skiba <abx### [at] babilonorg> wrote:
> Is it temporary workaround of some bug or final solution? If final then there
> isn't any note about it in documentation.
Redeclaring functions is not allowed. Unfortunately the parser doesn't
always seem to catch every attempt to do so. Log this as a bug. Expected
behavior is always (the same) error message.
The only "legal" way to redeclare a function is to undef it first.
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 03 Jan 2002 16:46:13 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> Redeclaring functions is not allowed.
So documentation needs update in this subject.
But note I'm not redeclaring function in below two lines!
#declare C=10;
#declare C=function{x+y+z};
ABX.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Skiba <abx### [at] babilonorg> wrote:
> So documentation needs update in this subject.
> But note I'm not redeclaring function in below two lines!
>
> #declare C=10;
> #declare C=function{x+y+z};
True, the check only works by looking if the variable name is redeclared.
While it was by design, if the check doesn't work this can probably be
improved as well when fixing the checking of redeclared functions.
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
: The only "legal" way to redeclare a function is to undef it first.
Wouldn't it be possible for the parser to automatically undef the function
when it's attempted to redeclare, and the declare it with the new function?
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3c34e860@news.povray.org> , Warp <war### [at] tagpovrayorg> wrote:
> Wouldn't it be possible for the parser to automatically undef the function
> when it's attempted to redeclare, and the declare it with the new function?
It would, but the requirement to explicitly undef is by design to not allow
the function on the left and right side!
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
wrote:
>> Redeclaring functions is not allowed.
>
> So documentation needs update in this subject.
>
Will be changed.
Ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |