POV-Ray : Newsgroups : povray.general : input/output file : Re: input/output file Server Time
30 Jul 2024 04:13:58 EDT (-0400)
  Re: input/output file  
From: esterichia
Date: 18 Oct 2009 05:30:00
Message: <web.4adadf7ee89cf16bfc1bd5380@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> I think commas are missing in the write statement because they are needed to
> separate the written parameters in the file in order to be read correctly.
> Check that your input file has commas too between parameters

Thank you, this works. It was my mistake.

> Also you can
> simplify your define as you do not need the #if statement. Just write:
>
> #while (defined(inputfile))
>   #declare x1 = y1;
>   #declare x2 = y2;
>   #declare x3 = y3;
>   #read (inputfile, y1, y2, y3)
>   ....
>   ....
>   #write (outputfile, x1,", ", x2,", ", x3,",","\n")
>   ....
> #end

> > I guess without the pre-read this will cause a parse error, as y1,y2,y3
> > will be undefined at this point.
>
> Aaah... yes, indeed. In this case that is required. But then, why not put
> the #read as the first line in the #while loop? Then the #if statement could
> be omitted.

I need two points to draw the cylinder, that is the first time I have to read 2
points and then only one for each cycle.


Post a reply to this message

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