POV-Ray : Newsgroups : povray.general : Reading from a text file : Re: Reading from a text file Server Time
29 Jul 2024 10:17:39 EDT (-0400)
  Re: Reading from a text file  
From: Scott
Date: 5 Jan 2012 09:50:01
Message: <web.4f05b8068e1c2e69be8719c80@news.povray.org>
Jim Holsenback <nom### [at] nomailcom> wrote:
> On 01/05/2012 08:44 AM, Scott wrote:
> > This should be easy, but I'm having some trouble.
> >
> > I would like to read a series of vectors<x,y,z>  from a text file and plot the
> > points as spheres.  To test things out, I made a text file with 2 vectors
> > separated by commas.
> >
> > I get this error message.  Can anyone tell me what I am doing wrong?
> >
> > //-------------------------------------------
> > #fopen MyFile "myData.txt" read
> > # local i = 1;
> >    #while (i<2)
> >    #read (MyFile,Vector[i]
> > Parse Error: Expected 'undeclared identifier', empty array found instead
> > //---------------------------------------------
>
> have a look at the following if you've not done that already:
> http://wiki.povray.org/content/Documentation:Reference_Section_2.3#Array_Identifiers
>
> should be #local i = 0; ????

Thanks.  However, I had previously checked out that section of the POV
reference.  I did initially have the #local i = 0, but that did not help.


Post a reply to this message

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