ingo <ing### [at] tagpovrayorg> wrote:
> i.i.r.c. there is/was a way to declare a variable in a function. But how?
> I don't remember and can't find it in the remnants of my archive.
You can not have variables that are local to the function. (And you can not have
any declarations of variables inside the function that are executed when you
call the function.) If a function is created within a macro, it can access
variables that are local to the macro. But be aware, because the scope of
function names are problematic and not well documented in POV-Ray.
Towards the end of this thread I explained how one can get around the problem
with missing local variables in functions:
Date: 2003-11-19 16:55:01
Subject: My favourite isosurface (see p.b.i. for image)
Author: Alex Kluchikov
For those that have not yet tried to program in any functional languages, it may
be an interesting exercise to program this way.
Post a reply to this message