POV-Ray : Newsgroups : povray.pov4.discussion.general : Thoughts on 'keyword_status()' functionality for v4.0. : Re: Thoughts on 'keyword_status()' functionality for v4.0. Server Time
25 Apr 2024 08:40:30 EDT (-0400)
  Re: Thoughts on 'keyword_status()' functionality for v4.0.  
From: William F Pokorny
Date: 27 Mar 2023 16:16:29
Message: <6421f99d$1@news.povray.org>
On 3/26/23 15:22, Bald Eagle wrote:
> I would probably use it (often) if I could run a simple
> #if (keyword_status() > Threshold) check.

I'm now leaning toward the function name 'word_is()' because it leaves 
open the possibility for similarly named extensions.

I should perhaps have left the return value detail for later - 
especially given I'm still sorting it out.

---
Most day to day usage would be simple:

#declare MyStr = "lockandkey"

#if (word_is(MyStr)=0)
    #debug concat("No usage conflicts for '",MyStr,"'.\n")
#end

//--- or

#if (word_is(MyStr)!=0)
    #debug concat("Usage conflicts exist for '",MyStr,"'.\n")
#end

//--- or

#if (word_is(MyStr)>0)
    #debug concat("'",MyStr,"' is a part of this POV-Ray version.\n")
#end

Bill P.


Post a reply to this message

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