[OpenSCAD] How to detect chr(0)

MichaelAtOz oz.at.michael at gmail.com
Fri Apr 17 18:12:29 EDT 2015


Also, NULL can be represented as "\u0000"

t=chr(0);
u="\u0000";
u2="\u0000";
echo(t,u); //ECHO: ""," "
if (t==u)
  echo("t==u"); // no
if (u==u2)
  echo("u==u2"); // yes
text(u);  // blank

You should read the 'invalid characters' part in the Wikipedia article.
There a a number of Unicode chars in the range 0x7F-0xFF that are invalid.
It is just luck that they seem to work.



-----
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-tp12351p12411.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list