[OpenSCAD] Incrementing a variable doesn't work as expected.
nigel at nigeljohnson.net
Wed Apr 1 05:14:31 EDT 2015
Yeah I'm not doing that any more because it doesn't work. I've moved to
recursion. Possibly an email lag?
This is what is now not working:
function cpos(s, n) = (n == -1) ? (0) : ( cpos(s,n-1) + (s[n]==".") ? 2 : 4
cpos("--.-",3) returns 4, instead of 14.
View this message in context: http://forum.openscad.org/Incrementing-a-variable-doesn-t-work-as-expected-tp12271p12280.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
More information about the Discuss