POV-Ray : Newsgroups : povray.beta-test : Operator promotion in array initializer Server Time
30 Jul 2024 18:19:15 EDT (-0400)
  Operator promotion in array initializer (Message 1 to 2 of 2)  
From: Philippe Debar
Subject: Operator promotion in array initializer
Date: 18 Oct 2001 16:07:55
Message: <3bcf369b@news.povray.org>
Operator promotion does not work in arry initializer. Doc implicitly say it
should.

----
#declare arTest=array[2] {<1,2,3>,0} ;
----

gives :
----
#declare arTest=array[2] {<1,2,3>,0} <----ERROR

Parse Error: Attempted to redefine vector identifier as float identifier.
----


Doc : "6.1.4.4  Operator Promotion"

"Versions of POV-Ray prior to 3.0 only allowed such use of a float as a
vector in various limited places such as scale and turbulence. However you
may now use this trick anywhere"




BTW,  I find the two following errors rather unclear in their (automatic?)
wording :

---
#declare arTest=array[2] {<1,2,3>,<0,0,0>,0 <----ERROR

Parse Error: No matching } in '{', float function 'float constant' found
instead
---


and


---
#declare arTest=array[3] {<1,2,3>,<0,0,0>} <----ERROR

Parse Error: Attempted to redefine vector identifier as object identifier.
---




Sys info :
POV-Ray 3.5 b6
Win 2k pro sp2
Ahtlon 1.2 GHz
512 MB DDR



Povingly,


Philippe


Post a reply to this message

From: Philippe Debar
Subject: Re: Operator promotion in array initializer
Date: 23 Oct 2001 19:23:41
Message: <3bd5fbfd@news.povray.org>
Am I making an error ? Isn't promotion supposed to work that way ? Or is it
old and well known stuff ?


Philippe


"Philippe Debar" <phd### [at] belgacomnet> wrote in message
news:3bcf369b@news.povray.org...
> Operator promotion does not work in arry initializer. Doc implicitly say
it
> should.


Post a reply to this message

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