discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

module as an argument in a module?

JD
Jerry Davis
Wed, Oct 19, 2016 5:25 PM

Is there a way to do this?

module doit(x) { x() }

module a() { something }
module b() { something else }

doit(a());
doit(b());

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

Is there a way to do this? module doit(x) { x() } module a() { something } module b() { something else } doit(a()); doit(b()); -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Openscad developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov
NH
nop head
Wed, Oct 19, 2016 5:32 PM

No not currently, but you can do this instead:

module doit() { children(); }

module a() { something }
module b() { something else }

doit() a();
doit() b();

On 19 October 2016 at 18:25, Jerry Davis jdawgaz@gmail.com wrote:

Is there a way to do this?

module doit(x) { x() }

module a() { something }
module b() { something else }

doit(a());
doit(b());

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

No not currently, but you can do this instead: module doit() { children(); } module a() { something } module b() { something else } doit() a(); doit() b(); On 19 October 2016 at 18:25, Jerry Davis <jdawgaz@gmail.com> wrote: > Is there a way to do this? > > module doit(x) { x() } > > module a() { something } > module b() { something else } > > doit(a()); > doit(b()); > > -- > Extra Ham Operator: K7AZJ > Registered Linux User: 275424 > Raspberry Pi and Openscad developer > > > *The most exciting phrase to hear in science - the one that heralds new > discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
JD
Jerry Davis
Wed, Oct 19, 2016 5:49 PM

ok. that works

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

On Wed, Oct 19, 2016 at 10:32 AM, nop head nop.head@gmail.com wrote:

No not currently, but you can do this instead:

module doit() { children(); }

module a() { something }
module b() { something else }

doit() a();
doit() b();

On 19 October 2016 at 18:25, Jerry Davis jdawgaz@gmail.com wrote:

Is there a way to do this?

module doit(x) { x() }

module a() { something }
module b() { something else }

doit(a());
doit(b());

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

ok. that works -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Openscad developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov On Wed, Oct 19, 2016 at 10:32 AM, nop head <nop.head@gmail.com> wrote: > No not currently, but you can do this instead: > > module doit() { children(); } > > module a() { something } > module b() { something else } > > doit() a(); > doit() b(); > > > > On 19 October 2016 at 18:25, Jerry Davis <jdawgaz@gmail.com> wrote: > >> Is there a way to do this? >> >> module doit(x) { x() } >> >> module a() { something } >> module b() { something else } >> >> doit(a()); >> doit(b()); >> >> -- >> Extra Ham Operator: K7AZJ >> Registered Linux User: 275424 >> Raspberry Pi and Openscad developer >> >> >> *The most exciting phrase to hear in science - the one that heralds new >> discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >