Extracting characters of a string

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

Extracting characters of a string

drxenocide
Why isn't this working:

in="testing";
for(i=[0:len(in)]){
    echo(in(i));
    }



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Extracting characters of a string

Mint86
I think it requires square brackets.

in="testing";
for(i=[0:len(in)]){
    echo(in[i]);
    }


On Fri, Aug 24, 2018, 10:49 AM Ari Diacou, <[hidden email]> wrote:
Why isn't this working:

in="testing";
for(i=[0:len(in)]){
    echo(in(i));
    }


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Extracting characters of a string

drxenocide
derp

On Fri, Aug 24, 2018 at 12:54 PM Eric b <[hidden email]> wrote:
I think it requires square brackets.

in="testing";
for(i=[0:len(in)]){
    echo(in[i]);
    }


On Fri, Aug 24, 2018, 10:49 AM Ari Diacou, <[hidden email]> wrote:
Why isn't this working:

in="testing";
for(i=[0:len(in)]){
    echo(in(i));
    }


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org