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
From: clipka
Subject: Re: check type of variable
Date: 5 Dec 2018 22:32:37
Message: <5c089855$1@news.povray.org>
Am 05.12.2018 um 20:39 schrieb ingo:
> 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
MegaPOV had such a feature. Official POV-Ray doesn't.
in news:5c089855$1@news.povray.org clipka wrote:
>> If not, read it as a feature request.>> #if (type(Var)=String)>> ...>> #end> > MegaPOV had such a feature. Official POV-Ray doesn't.
Ah yes, #declare Identifier=is ( IDENTIFIER , TYPE | SUBTYPE );
I guess this feature is probably not high on the transplantation list.
ingo