POV-Ray : Newsgroups : povray.beta-test : HF_Square Parse Error Server Time
4 Nov 2024 19:18:44 EST (-0500)
  HF_Square Parse Error (Message 1 to 3 of 3)  
From: Thorsten
Subject: HF_Square Parse Error
Date: 2 Oct 2001 10:18:03
Message: <3BB9CC2D.6EC9FA92@ewetel.net>
Hello :-))

Shapes.inc again. Trying to have a look at
    object {
      HF_Square(
        "f_noise3d(x*3, y*3, z*3)", // FunctionName
        <-4,0,1>, // MnExt
        < 4,1,4>, // MxExt
        <10,10>, // Res
        false, // Smooth
        "" // FileName
      )
      pigment { Yellow }
    }
I received this error:
Parse Error: Expected 'operator', ( found instead
in parse_string.tmp.

I think the code above should be valid... If not,
please forgive me, take my excuse and forget
about it.

By modifying the HF_Square macro a bit

#macro HF_Square(FunctionName, MnExt, MxExt, Res, Smooth, FileName)
 //#local Function =
Parse_String(concat("function(x,y,z){",FunctionName,"(x,y,z)}"))
   #local Function =
Parse_String(concat("function(x,y,z){",FunctionName,"}"))

I got it running...

Did I make any mistakes with the function declaration in
the code snippet above?

Greetings :-))

Thorsten
(3.5beta4, various systems, windows)


Post a reply to this message

From: Bob H 
Subject: Re: HF_Square Parse Error
Date: 2 Oct 2001 11:21:52
Message: <3bb9db90@news.povray.org>
"Thorsten" <tho### [at] ewetelnet> wrote in message
news:3BB9CC2D.6EC9FA92@ewetel.net...
>
> Shapes.inc again. Trying to have a look at
>     object {
>       HF_Square(
>         "f_noise3d(x*3, y*3, z*3)", // FunctionName
>         <-4,0,1>, // MnExt
>         < 4,1,4>, // MxExt
>         <10,10>, // Res
>         false, // Smooth
>         "" // FileName
>       )
>       pigment { Yellow }
>     }
> I received this error:
> Parse Error: Expected 'operator', ( found instead
> in parse_string.tmp.
>
> I think the code above should be valid... If not,
> please forgive me, take my excuse and forget
> about it.

Although it's not said what is valid for use as "function" it seems to me to
be only those which don't require parameters.  For instance f_bozo and
f_crackle from the functions.inc.  I don't have any idea what the correct
way of using these is myself, only that those can work okay without
modification.

> By modifying the HF_Square macro a bit
>
> #macro HF_Square(FunctionName, MnExt, MxExt, Res, Smooth, FileName)
>  //#local Function =
> Parse_String(concat("function(x,y,z){",FunctionName,"(x,y,z)}"))
>    #local Function =
> Parse_String(concat("function(x,y,z){",FunctionName,"}"))
>
> I got it running...
>
> Did I make any mistakes with the function declaration in
> the code snippet above?
>
> Greetings :-))
>
> Thorsten
> (3.5beta4, various systems, windows)
>


Post a reply to this message

From: Thorsten
Subject: Re: HF_Square Parse Error
Date: 3 Oct 2001 00:54:09
Message: <3BBA997E.FF2190E3@ewetel.net>
> Although it's not said what is valid for use as "function" it seems to me to
> be only those which don't require parameters.  For instance f_bozo and
> f_crackle from the functions.inc.  I don't have any idea what the correct
> way of using these is myself, only that those can work okay without
> modification.
>
> > By modifying the HF_Square macro a bit
> >
> > #macro HF_Square(FunctionName, MnExt, MxExt, Res, Smooth, FileName)
> >  //#local Function =
> > Parse_String(concat("function(x,y,z){",FunctionName,"(x,y,z)}"))
> >    #local Function =
> > Parse_String(concat("function(x,y,z){",FunctionName,"}"))

An additional boolean parameter might come handy...

#macro HF_Square(FunctionName, MnExt, MxExt, Res, Smooth, FileName, Parameters)
#if (Parameters)
  #local Function = ... Version1
#else
  #local Function = ... Version2
#end

Thank you :-))

Thorsten


Post a reply to this message

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