"ingo" <nomail@nomail> wrote:
> A scene file I just added to my tool box directory.
>
> As the #switch #case only compares floats and not strings I always have to
> figure out what character is what number. To scratch that itch a little scene
> that writes an include file for the 'reverse look up' of the chr function using
> a dictionary. It covers the ascii chars 34 to 127 as I don't know how to use a
> 'bell' as key.
Can you not use asc() for this ?`
http://www.povray.org/documentation/view/3.7.1/228/
You can use chr(7) to quote the ASCII bell character.
https://www.povray.org/documentation/view/3.7.2/232/
This code outputs 7
#version 3.7;
global_settings { assumed_gamma 1.0 }
#debug "\n"
#debug str(asc(chr(7)), 0, 0)
#debug "\n"
#error ""
Perhaps chr(7) can also be used as a key in a v3.8 dictionary (?)
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|