POV-Ray : Newsgroups : povray.beta-test : v3.8 beta 2 command line option parsing Server Time
8 Oct 2024 17:39:51 EDT (-0400)
  v3.8 beta 2 command line option parsing (Message 1 to 2 of 2)  
From: Chris R
Subject: v3.8 beta 2 command line option parsing
Date: 1 Dec 2021 10:00:00
Message: <web.61a78d9649903ca08c605bc45cc1b6e@news.povray.org>
I'm a little slow on the uptake picking up beta 2, so I just noticed this issue.

There is a note in the changelog for this release about floating point precision
parsing command line options being reverted back to v3.6 semantics.  I note that
this is causing things to break in my v3.7 and higher scenes (the only version I
have used recently).

The code in question:

#switch(test_case)
#case(1.1)
   #declare camera_location=<0, 0, 0>;
....
#break
#end

On the command line (windows) I use: Declare=test_case=1.1 and the case is not
picked up in my switch.  Printing the value of test_case out with str() and a
precision of 7 or higher, I see trailing non-zero values that are causing this.

I have a work-around to truncate the value to 3 decimal places, as I never use
more than that to designate a test case number, but thought I'd pass this along
as it can be difficult to debug in a scene.

-- Chris Rath


Post a reply to this message

From: jr
Subject: Re: v3.8 beta 2 command line option parsing
Date: 2 Dec 2021 02:25:00
Message: <web.61a873959500e01ea8869266cde94f1@news.povray.org>
hi,

"Chris R" <car### [at] comcastnet> wrote:
> ...
> On the command line (windows) I use: Declare=test_case=1.1 ...

recent discussion:
<https://news.povray.org/povray.bugreports/thread/%3Cweb.60fea0b2e0f64d045e0fed26cde94f1%40news.povray.org%3E/>


regards, jr.


Post a reply to this message

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