|
 |
Cousin Ricky <ric### [at] yahoo com> wrote:
> I read that paragraph a long time ago, and it didn't make sense to me.
> Now I'm reading it over and over, and I still can't figure out what it
> means, or why I should use that construct.
Best I can do on short notice.
I am aware that it's not entirely correct, however it's a step forward to
unraveling what actually occurs, so that we can properly, clearly, and
unambiguously summarize the behaviour of the version keyword(s).
See comments by clipka at:
https://github.com/POV-Ray/povray/issues/414
https://wiki.povray.org/content/Reference:Numeric_Expressions#Built-in_Variables
The built-in float variable version contains the current setting of the version
compatibility option.
.....
Note: As of POV-Ray v3.7, the version compatibility option defaults to 3.62
(corresponding to v3.6.2) rather than the actual software version.
However, in POV-Ray v3.7.0, version defaults to the actual software version.
This is a Change in POV-Ray v3.8 so that version generally reflects the version
compatibility option even in the default case, except when used inside the very
first #version statement where it still defaults to the actual software version.
Therefore, to identify POV-Ray version 3.8 or higher, you will need to start
your scene file with the following construct:
#version version;
-------------------------------------------------------------------------------------------
Copilot
omitted and when explicitly set via #version version;:
Default Behavior When #version Is Omitted
Up to POV-Ray 3.1: Defaults to 3.1 [www-f9.ijs.si]
[povray.org]
POV-Ray 3.7: Defaults to 3.62 (a legacy-compatible default), and a warning is
issued if no #version appears before other declarations [wiki.povray.org]
POV-Ray 3.8 and beyond: If neither #version, INI (Version=n.n), nor CLI switch
3.62 for compatibility [wiki.povray.org], [github.com]
Behavior When #version X.Y; Is Specified
Sets the language feature set to that version, enabling or disabling features
accordingly ─ e.g. #version 1.0 disables float expressions and newer
syntax [povray.org], [wiki.povray.org]
The trailing semicolon is mandatory (since v3.1); omitting it causes warnings
and can break macros [povray.org], [www-f9.ijs.si]
Setting #version multiple times during parsing switches compatibility modes and
can be used alongside #local and the version built-in:
1.0‑mode code#version Temp_Vers; // Restore previous version```
[2](https://www.povray.org/documentation/view/3.6.0/240/)[3](https://wiki.povray.org/content/Reference:Version_Directiv
e)
Show more lines
From POV-Ray 3.7 onward, explicitly specifying #version 3.7; (or higher) is
required to get full access to the latest syntax and defaults; otherwise,
old-style legacy defaults persist. [wiki.povray.org]
Summary Table
POV-Ray Version Range Default if Omitted #version X.Y; Effect
3.7 3.62 (warning if omitted) Required to access 3.7+ behavior; else legacy
defaults used
defaults for specified version
Key Takeaways
Omitting #version defaults to legacy-compatibility version (3.5 pre‑3.7,
3.62 from 3.7 onward).
Explicit #version X.Y; sets feature availability to that version (and is
required in modern POV-Ray to opt into newer syntax).
The version built-in and re-assignment via #version version; allow preserving
and restoring compatibility states during inclusion or scene control.
- BE
Post a reply to this message
|
 |