POV-Ray : Newsgroups : povray.general : #version directive : Re: #version directive Server Time
26 Apr 2024 15:23:19 EDT (-0400)
  Re: #version directive  
From: Kenneth
Date: 8 Feb 2018 05:55:00
Message: <web.5a7c2b99c5234a59a47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> If you want your scene to automatically adapt to whatever version is
> used, it is recommended to use
>
>     #version version;
>
> as the first line and continue from there.

I didn't realize this, even after re-reading the docs; the combination of the
#version directive and  version keyword has always been a little mysterious to
me. So, no matter what version of POV-Ray I'm using (or what version my scene
was originally written with), if I use

#version version

then the scene file will automatically be processed *as if* it was written in
the currently-running POV-Ray version? (I hope I'm being clear.) Disregarding
any compatibility problems that might arise, of course, if the scene file is an
old one. In other words, if I'm currently using a specific v3.7.1 beta, then

#version version
is basically a 'shorthand' way of specifying

#version 3.71;

?

The thing is, the docs say this:
"As of version 3.7, there has been a requirement implemented. In order to obtain
full version 3.7 functionality, you MUST specify the #version 3.7".  Or 3.71,
etc. But there, it doesn't mention the   #version version   trick (or rather,
the short explanation is not totally clear that it can be used instead.)

Also, this:
"...and a CHANGE as of POV-Ray 3.7.1 or later it is now considered an outright
error to use #version 3.71 or higher in a main scene file that does not start
with a #version directive."

Maybe it's just me, but that sounds confusing. "#version 3.71" is in GREEN there
(like the other keywords used in those paragraphs), but is it meant to be? I'm
wondering if the sentence is actually trying to say something like this:

"...and a CHANGE as of POV-Ray 3.7.1 or later it is now considered an outright
error to run a scene file in v3.7.1 or higher that does not start with a
#version directive."  ??

And continuing... (the forward slashes are mine):
"If you do need to do some processing /before you decide/ on a version
compatibility option, start your scene with the following construct:
  #version version;

That could possibly be interpreted as meaning a 'real' #version number needs to
be added later in the scene.

If I'm wrong about any of this, I apologize for possibly confusing the issue
further ;-)


Post a reply to this message

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