POV-Ray : Newsgroups : povray.beta-test : check type of variable : Re: check type of variable Server Time
20 Jun 2021 18:33:55 EDT (-0400)
  Re: check type of variable  
From: clipka
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.

Post a reply to this message

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