POV-Ray : Newsgroups : povray.newusers : Something strange is happening to me (again) : Something strange is happening to me (again) Server Time
20 Oct 2025 09:40:32 EDT (-0400)
  Something strange is happening to me (again)  
From: kurtz le pirate
Date: 20 Oct 2025 03:53:28
Message: <68f5ea78$1@news.povray.org>
Hello,

Let an array of "4D" vectors.
This code works well :

#write ( FH, Array[i].x,",",Array[i].y,",",Array[i].z,",",Array[i].filter )




Now with and array of "5D" vectors.
Base on the same schema i code this :

#write ( FH, 
Array[i].x,",",Array[i].y,",",Array[i].z,",",Array[i].filter,",",Array[i].transmit 
)

And i get this error : "Expected 'string', colour identifier found instead".


On <https://wiki.povray.org/content/Reference_Talk:Vector_Expressions> 
from Bald Eagle, you can read :
#declare Vector = < 1, 2, 3, 4, 5>;
...
#declare Fifth_Component = Vector.transmit;// 5


The fifth element corresponds well to the keyword "transmit".
So why did this error occur?

I got around the issue like this :
#declare _x = Array[i].x;
#declare _y = Array[i].y;
#declare _z = Array[i].z;
#declare _f = Array[i].filter;
#declare _t = Array[i].transmit;
#write ( FH, _x,",",_y,",",_z,",",_f,",",_t )

However, I would like to understand what is wrong with my syntax.
Thank you for your help.






-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

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