POV-Ray : Newsgroups : povray.beta-test : Incorrect detection of seperators in vectors : Re: Incorrect detection of seperators in vectors Server Time
30 Jul 2024 02:27:16 EDT (-0400)
  Re: Incorrect detection of seperators in vectors  
From: Mark Wagner
Date: 17 Jan 2002 01:39:32
Message: <3c4671a4$1@news.povray.org>
Kevin Ellis wrote in message <3c45d800$1@news.povray.org>...
>Windows seems to detect a . (full stop) as a , (comma) in a vector if you
>give it an invalid number, e.g <1,1,0.0.5> I think this used to give the
>warning 'strange expression after rgb' or something of the sort in 3.1,


This is a side effect of the fact that commas are optional almost
everywhere.  What happens in the <1,1,0.0.5> case is:
Pov finds the "<" and decides that you are providing a vector
Pov finds the "1," and interprets it as the first component of the vector
Pov finds the next "1," and interpretes it as the second component of the
vector
Pov finds the "0.0.", and since a number can't contain two decimal places,
it interprets it as "0.0", the third component of the vector
Pov finds the ".5", and interprets it as the fourth component of the vector
Pov finds the ">" and decides that that is all there is to the vector
The result is that <1,1,0.0.5> is interpreted as the four-dimensional vector
<1 1 0.0 .5>

--
Mark


Post a reply to this message

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