POV-Ray : Newsgroups : povray.newusers : Functions defined in macros? Server Time
4 Nov 2024 23:15:38 EST (-0500)
  Functions defined in macros? (Message 1 to 2 of 2)  
From: Queex
Subject: Functions defined in macros?
Date: 29 Aug 2004 10:20:00
Message: <web.4131e4f2c9c7d9ccc08e0c4f0@news.povray.org>
I've had a lot of difficulty passing functions as parameters in macros-
although I thought I'd cracked it until now.

The ridiculous thing is, I have a macro defined in one .pov file, which
calls the macros with functions in another file without any problem. Inside
this pov file the macro is called and it renders properly.

However, then I create another .pov file and try to call the macro in the
first .pov file, and it fails. The call to the macro is identical in both
cases. The only difference is that the first file has the main macro
defined inside it, and the second file includes the first file before
trying to call it.

The error given is:

Parse Error: Identifier expected, incomplete function call or spline call
found instead.

Am I trying to do something I shouldn't by passing functions as macro
parameters? Why does it work in one file and not the other? It's maddening.

Cheers,

Ben


Post a reply to this message

From: Christoph Hormann
Subject: Re: Functions defined in macros?
Date: 29 Aug 2004 11:10:07
Message: <cgsrci$gl5$3@chho.imagico.de>
Queex wrote:
> I've had a lot of difficulty passing functions as parameters in macros-
> although I thought I'd cracked it until now.

You can find a lot of examples how to pass functions as macro parameters 
in the IsoCSG library:

http://www.tu-bs.de/~y0013390/pov/ic/index.html

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

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