discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Should lambda functions be found in use<d> files?

CC
Cory Cross
Mon, Aug 25, 2025 9:51 PM

xlib.scad:

x=function () "from_xlib";

my source file:

use<xlib.scad>
echo(x());

WARNING: Ignoring unknown function 'x' in file test.scad, line 2

ECHO: undef

I think this is a bug, as variables from use files are available and
functions are as well, so shouldn't variables which are lambda functions?

  • Cory
xlib.scad: x=function () "from_xlib"; my source file: use<xlib.scad> echo(x()); WARNING: Ignoring unknown function 'x' in file test.scad, line 2 ECHO: undef I think this is a bug, as variables from use files are available and functions are as well, so shouldn't variables which are lambda functions? - Cory
NH
nop head
Mon, Aug 25, 2025 9:53 PM

No variables are not available from used files.

On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, <
discuss@lists.openscad.org> wrote:

xlib.scad:

x=function () "from_xlib";

my source file:

use<xlib.scad>
echo(x());

WARNING: Ignoring unknown function 'x' in file test.scad, line 2

ECHO: undef

I think this is a bug, as variables from use files are available and
functions are as well, so shouldn't variables which are lambda functions?

  • Cory

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

No variables are not available from used files. On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, < discuss@lists.openscad.org> wrote: > xlib.scad: > > x=function () "from_xlib"; > > my source file: > > use<xlib.scad> > echo(x()); > > WARNING: Ignoring unknown function 'x' in file test.scad, line 2 > > ECHO: undef > > I think this is a bug, as variables from use files are available and > functions are as well, so shouldn't variables which are lambda functions? > > - Cory > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
CC
Cory Cross
Mon, Aug 25, 2025 10:34 PM

Ugh I'm always confused because bosl2 uses include and we're discussing why more-or-less in the other threads. Thanks.

On August 25, 2025 5:53:26 PM EDT, nop head via Discuss discuss@lists.openscad.org wrote:

No variables are not available from used files.

On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, <
discuss@lists.openscad.org> wrote:

xlib.scad:

x=function () "from_xlib";

my source file:

use<xlib.scad>
echo(x());

WARNING: Ignoring unknown function 'x' in file test.scad, line 2

ECHO: undef

I think this is a bug, as variables from use files are available and
functions are as well, so shouldn't variables which are lambda functions?

  • Cory

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Ugh I'm always confused because bosl2 uses include and we're discussing why more-or-less in the other threads. Thanks. On August 25, 2025 5:53:26 PM EDT, nop head via Discuss <discuss@lists.openscad.org> wrote: >No variables are not available from used files. > >On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, < >discuss@lists.openscad.org> wrote: > >> xlib.scad: >> >> x=function () "from_xlib"; >> >> my source file: >> >> use<xlib.scad> >> echo(x()); >> >> WARNING: Ignoring unknown function 'x' in file test.scad, line 2 >> >> ECHO: undef >> >> I think this is a bug, as variables from use files are available and >> functions are as well, so shouldn't variables which are lambda functions? >> >> - Cory >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org
BC
Bob Carlson
Mon, Aug 25, 2025 11:28 PM

Yes, includes allow you to reference variables. Use does not.

On Aug 25, 2025, at 15:34, Cory Cross via Discuss discuss@lists.openscad.org wrote:

Ugh I'm always confused because bosl2 uses include and we're discussing why more-or-less in the other threads. Thanks.

On August 25, 2025 5:53:26 PM EDT, nop head via Discuss discuss@lists.openscad.org wrote:

No variables are not available from used files.

On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, <discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

xlib.scad:

x=function () "from_xlib";

my source file:

use<xlib.scad>
echo(x());

WARNING: Ignoring unknown function 'x' in file test.scad, line 2 <>
ECHO: undef

I think this is a bug, as variables from use files are available and functions are as well, so shouldn't variables which are lambda functions?

  • Cory

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org_______________________________________________

OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Yes, includes allow you to reference variables. Use does not. > On Aug 25, 2025, at 15:34, Cory Cross via Discuss <discuss@lists.openscad.org> wrote: > > Ugh I'm always confused because bosl2 uses include and we're discussing why more-or-less in the other threads. Thanks. > > > > On August 25, 2025 5:53:26 PM EDT, nop head via Discuss <discuss@lists.openscad.org> wrote: >> No variables are not available from used files. >> >> On Mon, 25 Aug 2025, 22:51 Cory Cross via Discuss, <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote: >>> xlib.scad: >>> >>> x=function () "from_xlib"; >>> >>> my source file: >>> >>> use<xlib.scad> >>> echo(x()); >>> >>> WARNING: Ignoring unknown function 'x' in file test.scad, line 2 <> >>> ECHO: undef >>> >>> >>> I think this is a bug, as variables from use files are available and functions are as well, so shouldn't variables which are lambda functions? >>> >>> >>> - Cory >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org>_______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org