[OpenSCAD] Openscad Indirect Functions
Torsten.Paul at gmx.de
Mon Oct 17 03:50:55 EDT 2016
Von: "Kuba Marek" <blue.cube at seznam.cz>
> f = function(a, b) a + b;
> instead of
> function f(a, b) = a + b;
I don't think we have a problem at definition time,
the trouble is where the data is passed to another
function (or module).
E.g (ignoring modules completely for now).
f = 6;
function f(x) = 1;
function call_indirect(func, x) = func(x);
call_indirect(f); // is that the variable or function?
As we don't have types, we can't easily infer which
of the 'f' thingies is supposed to be passed to the
To clarify which one is meant, we either have to use a
unified namespace, or have the user declare explicitely
which of the namespaces too choose from.
More information about the Discuss