POV-Ray : Newsgroups : povray.beta-test : Problems with functions in beta 16 Server Time
29 Jul 2024 20:17:27 EDT (-0400)
  Problems with functions in beta 16 (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From:
Subject: Re: Problems with functions in beta 16
Date: 22 Apr 2002 11:47:17
Message: <rsb8cukh345qeltb1gj6b786n374v6e076@4ax.com>
On Thu, 18 Apr 2002 22:17:19 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:

>In article <3CB1B39A.3F70A85A@gmx.de> , Christoph Hormann 
><chr### [at] gmxde>  wrote:
>
> > 1) The following code generates an error about recursive function calls
> > (in both versions for '#declare fn_A...'):
>
> Yes, because the detection of recursive calls has to rely on the function
> name.

I'm not sure it can be considered as hole in this checking system but if not
then I have simple workaround for our iso_csg library. It is possible now to
redeclare passed functions as array and array not checks recursive calls.

#declare IC_Arr=array[4]
#declare a=array[4]

#macro IC_Merge4(fn_A, fn_B, fn_C, fn_D)
  #local a=array[4]{fn_A,fn_B,fn_C,fn_D};
  function {  
    min(a[0](x, y, z),
        a[1](x, y, z),
        a[2](x, y, z),
        a[3](x, y, z))      
  }
#end 

#declare IC_Arr[0]=function(x, y, z) { x }  
#declare IC_Arr[1]=function(x, y, z) { y }  
#declare IC_Arr[2]=function(x, y, z) { z }    
#declare IC_Arr[3]=function(x, y, z) { x+y }  

#declare a[0]= IC_Merge4(function { IC_Arr[0](x, y, z) }, function {
IC_Arr[1](x, y, z) }, function { IC_Arr[2](x, y, z) }, function {
IC_Arr[3](x, y, z) }) 

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problems with functions in beta 16
Date: 22 Apr 2002 11:53:41
Message: <3CC43204.465F89EA@gmx.de>

> 
> I'm not sure it can be considered as hole in this checking system but if not
> then I have simple workaround for our iso_csg library. It is possible now to
> redeclare passed functions as array and array not checks recursive calls.
> 

Have you checked this for possible performance eating side effects?  If
there aren't any this could be a possible solution although it would
probably be sufficient to use rare identifiers for the parameters.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 20 Apr. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From:
Subject: Re: Problems with functions in beta 16
Date: 22 Apr 2002 12:02:53
Message: <kkc8cu02uuas71rut38epkcj1c3d7fm5ar@4ax.com>
On Mon, 22 Apr 2002 17:53:40 +0200, Christoph Hormann <chr### [at] gmxde>
wrote:
> "W?odzimierz ABX Skiba" wrote:
> > 
> > I'm not sure it can be considered as hole in this checking system but if not
> > then I have simple workaround for our iso_csg library. It is possible now to
> > redeclare passed functions as array and array not checks recursive calls. 
>
> Have you checked this for possible performance eating side effects?

I asked some day in p.a-u what happen when something like
    #local f_a=function(m){ f_b(m) }
is invoked. As answer I recived change 1502 in RC1 :-)

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problems with functions in beta 16
Date: 22 Apr 2002 13:52:52
Message: <3cc44df4$1@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> I asked some day in p.a-u what happen when something like
>     #local f_a=function(m){ f_b(m) }
> is invoked. As answer I recived change 1502 in RC1 :-)

Either you misunderstood my very short change note or I am not remembering
correctly what you asked about the above statement...

    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

From: Thorsten Froehlich
Subject: Re: Problems with functions in beta 16
Date: 22 Apr 2002 13:57:03
Message: <3cc44eef$1@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> I'm not sure it can be considered as hole in this checking system but if not
> then I have simple workaround for our iso_csg library. It is possible now to
> redeclare passed functions as array and array not checks recursive calls.

The checking is still done but in a different way.  However, for performance I
strongly recommend not to use an array but unusual variable names, i.e.
__IC_Merge4_fn_A, etc would unlikely be not unique...

    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

From:
Subject: Re: Problems with functions in beta 16
Date: 23 Apr 2002 03:36:27
Message: <6l3acuon0g97onv52l869gm7g39ebja5ic@4ax.com>
On Mon, 22 Apr 2002 19:52:50 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> > I asked some day in p.a-u what happen when something like
> >     #local f_a=function(m){ f_b(m) }
> > is invoked. As answer I recived change 1502 in RC1 :-)
>
> Either you misunderstood my very short change note or I am not remembering
> correctly what you asked about the above statement...

It was a joke that it was answer for my question. You can find my question in
http://news.povray.org/pcojau0tsr5hk9nprsrf38s3t5ae1ht9ro%404ax.com

ABX


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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