[OpenSCAD] How to detect chr(0)
paul at brownsbrain.com
Fri Apr 17 12:15:07 EDT 2015
> Your logic is a bit off there.
> Basically your test is 'if(chr(255)==chr(255))'
> Unfortunately, OpenSCAD doesn't (yet?) have a asc() function (or whatever
> the unicode version would be called).
Yes, thanks. This is really just an example that represents my code. The
actual code is many lines now. Basically it compares each character of
the_text to the values from 0 to 255. This is, as I'm sure everybody here
knows, the same as 0x00 to 0xFF. For example sake, I only included the
condition that finds the 0xFF. Once I clean up my code I'll post it here or
somewhere so people can enjoy it - tearing it apart or marveling at it.
Either way it will be working at that point. (chr(0) is only part not
... I should have pointed out that this code was only an example to show the
comparison and what it printed out.
View this message in context: http://forum.openscad.org/How-to-detect-chr-0-tp12351p12403.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
More information about the Discuss