POV-Ray : Newsgroups : povray.general : PoV can't read my array : Re: PoV can't read my array Server Time
29 Jul 2024 10:30:28 EDT (-0400)
  Re: PoV can't read my array  
From: Thomas de Groot
Date: 12 Jan 2012 03:01:35
Message: <4f0e935f$1@news.povray.org>
On 12-1-2012 3:26, Alain wrote:

> There is a coma before the closing brace.
> As it is now, you write eache elements and unconditionaly follow it with
> a coma, resulting in one superflous coma.
>
>
> Possible cure:
> Write the first element.
> Write a coma BEFORE each successive elements.
>

or, if you use a counter when writing away your data:

         //Writing the last line in the file:
         #if (i = Count)
           #write (MyFile,MyValue,"\n")
         #else
           #write (MyFile,MyValue,",\n")
         #end

But I guess that Alain's solution is faster.

Thomas


Post a reply to this message

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