|
|
In povray.text.scene-files Thorsten Froehlich <thorsten@trf.de> wrote:
: Regarding your question, there is no function to determine the type.
: However, as the result of any function in POV-Ray is deterministic, you
: should always know which variable type a variable is. For a printing macro,
: you would then just pass that information along with the variable.
I don't think it would be a bad idea to be able to get the variable type
from a variable instance (doesn't it carry it along anyways?).
I don't even think that making a set of functions returing a bool value for
this would be hard. For example:
isvector()
isreal()
isstring()
...
For exampe isvector() would return true if the parameter is a vector, else
false.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|