POV-Ray : Newsgroups : povray.pov4.discussion.general : Thoughts on 'keyword_status()' functionality for v4.0. : Thoughts on 'keyword_status()' functionality for v4.0. Server Time
18 Apr 2024 12:46:15 EDT (-0400)
  Thoughts on 'keyword_status()' functionality for v4.0.  
From: William F Pokorny
Date: 26 Mar 2023 01:58:10
Message: <641fdef2$1@news.povray.org>
In working recently with the povr fork to restore v3.7, v3.6 and prior, 
ID only checking behavior with the #ifdef(), #ifndef() and defined() 
keywords, the subject of keyword status checking in SDL came up again.

I've looked at the reserved word warning code in v3.8 and on.

Plus I've been thinking about the bigger picture of actual keywords, 
possible keywords, stand in internal keywords used for other purposes 
and functions. We have too the ini keywords and flags.

As an initial proposal thinking about a new 'keyword_status()' function 
passed strings like "tau". It would return the following values for the 
status of various strings in answer to what meanings are relative to the 
version of code being run.

-5 ==> ini keyword (cmd line flag ?) setting removed.
-4 ==> lower case, shipped function looking like something inbuilt.
-3 ==> deleted inbuilt function formerly defined in functions.inc.
-2 ==> pseudo / hidden keyword removed.
-1 ==> formerly visible and usable keyword removed.
  0 ==> not now and never a keyword. Good to go.
+1 ==> active SDL keyword.
+2 ==> pseudo / hidden keywords active or potentially active on config.
+3 ==> inbuilt function declared in functions.inc or cfunctions.inc.
+4 ==> (povr never fakes inbuilt, lower case keywords with functions)
+5 ==> current ini keyword (cmd line flag?) setting.

(+-5 checking would be case insensitive)

Actual keyword support in SDL is more complex because the meaning of 
keywords changes over time as functionality is added, removed or 
changed. Not thinking to try and document any of that drift in usage 
detail over time with keyword_status().

The central aim is giving users a greater ability to check whether using 
any particular 'word' / 'keyword' in a scene has the potential to cause 
trouble or confusion.

Thoughts?

Bill P.


Post a reply to this message

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