[OpenSCAD] How to detect chr(0)

Fantome paul at brownsbrain.com
Sat Apr 18 13:14:13 EDT 2015


nophead wrote
> If you just want a string of numbers, why not just use a vector? It won't
> be 8 bits, it will be integers stored as floats, but as you can see
> characters aren't really 8 bits either.
> 
> The only difference I can see would be if you do maths on the values but
> if
> do it all modulo 256 with the % operator and floor divisions, etc, you
> should be able to emulate 8 bits.

Yup I could most likely do it with the % operator. I'm still new to openSCAd
so I just chose a way and decided to stick with it until either it worked or
I decided it couldn't be done. 

I put my code up on thingiverse (http://www.thingiverse.com/thing:779394)
because the end result of it is meant to be a 3D printed object. Anybody
interested in what I did should take a look.

I will look into the modulo 256 stuff next. Maybe I'll redo it all and end
up with a much shorter listing. 

thanks again...



--
View this message in context: http://forum.openscad.org/How-to-detect-chr-0-tp12351p12417.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list