[OpenSCAD] How to detect chr(0)

MichaelAtOz oz.at.michael at gmail.com
Thu Apr 16 20:33:31 EDT 2015


t = chr(0,41,42,43,44,255); 
echo(t);
text(t);
for(i=[0:len(t)-1]) {
	echo(t[i]);
	translate([0,i*15,0]) 
		text(t[i]);
if(t[i]==chr(0))
	echo("match 0");
if(t[i]==chr(255))
	echo("match 255");
}

Hmmm...

Either a bug, or chr(0) plays a part in unicode or means something else...



-----
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. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/
--
View this message in context: http://forum.openscad.org/How-to-detect-chr-0-tp12351p12393.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list