POV-Ray : Newsgroups : povray.beta-test : check type of variable : check type of variable Server Time
17 Apr 2024 22:57:13 EDT (-0400)
  check type of variable  
From: ingo
Date: 5 Dec 2018 14:39:10
Message: <XnsA9AFD21809B85seed7@news.povray.org>
When I do it wrong POV-Ray always tells me that it for example expects a 
string instead of an arry.

Is there a way to check the type of a variable? Is especially interesting 
now arrays can hold different types. Also gives the possibility to declare 
a single instead of declaring a whole array for a single item, when inost 
cases for a macro a single value suffices.

If not, read it as a feature request.
#if (type(Var)=String)
    	...
#end

Ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.