ashuan
8 years ago
Hello alls,
I'm a newbie to OpenScad but not to programing language.
I have a blocking point about module return.
I have a look about this forum without finded answer.
I my preferated world, i wish have a syntaxe like this :
module <name> (<parameter1>, <parameter2>, ..., <parameterN>) {
<instruction1>;
<instruction2>;
...
<instructionN>;
<name> = <return value>; // << or return <return value> or result <return
value> or ...
}
an example that is useless if it is not to illustrate my purpose :
module inList(searchText, list)
{
resultat = false;
if (len(search(searchText, list)== 0))
{
resultat = true;
}
inList = resultat;
}
Could you help me, please ?
--
Sent from: http://forum.openscad.org/
I'm a newbie to OpenScad but not to programing language.
I have a blocking point about module return.
I have a look about this forum without finded answer.
I my preferated world, i wish have a syntaxe like this :
module <name> (<parameter1>, <parameter2>, ..., <parameterN>) {
<instruction1>;
<instruction2>;
...
<instructionN>;
<name> = <return value>; // << or return <return value> or result <return
value> or ...
}
an example that is useless if it is not to illustrate my purpose :
module inList(searchText, list)
{
resultat = false;
if (len(search(searchText, list)== 0))
{
resultat = true;
}
inList = resultat;
}
Could you help me, please ?
--
Sent from: http://forum.openscad.org/