"Let" deprecated?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"Let" deprecated?

edwilliams
This post has NOT been accepted by the mailing list yet.
   I could not get the wiki example:

for (i = [10:50])
{
    let (angle = i*360/20, r= i*2, distance = r*5)
    {
        rotate(angle, [1, 0, 0])
        translate([0, distance, 0])
        sphere(r = r);
    }
}

to compile.  

for (i = [10:50])
{
       angle = i*360/20;
       r= i*2;
       distance = r*5;
        rotate(angle, [1, 0, 0])
        translate([0, distance, 0])
        sphere(r = r);
    }
}

using local variables worked.   Has "let" been deprecated, or am I missing something - which is quite possible, since I don't have much experience with OpenSCAD.
Reply | Threaded
Open this post in threaded view
|

Re: "Let" deprecated?

MichaelAtOz
Administrator
'let' is a new feature and is in the development snapshots, that should be mentioned in the wiki.
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: "Let" deprecated?

MichaelAtOz
Administrator
wiki fixed.
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: "Let" deprecated?

edwilliams
This post has NOT been accepted by the mailing list yet.
In reply to this post by edwilliams
   OK.  Thanks for fixing the docs.