POV-Ray : Newsgroups : povray.programming : help with #read Server Time
29 Jul 2024 04:23:33 EDT (-0400)
  help with #read (Message 1 to 4 of 4)  
From: Mike Weber
Subject: help with #read
Date: 27 Nov 1998 19:23:36
Message: <365f4288.0@news.povray.org>
I'm using the new #read in POV 3.1 but its not working for me.  I'm read
X,Y,Z data from a file and I get an error on the third line below:

-16.00000,95.00000,0.00000
-8.00000,89.00000,0.00000
0.00000,82.00000,0.00000  <<< this line
6.00000,75.00000,0.00000
12.00000,67.00000,0.00000
18.00000,60.00000,0.00000
23.00000,52.00000,0.00000
27.00000,44.00000,0.00000


Here is the line I'm using to read the data from the file:

 #read (XYZDATA, dataX, dataY, dataZ)


I don't understand why it can read the first two lines,
but gives me this error on the third:

 #read (XYZDATA, dataX, <---- ERROR

error: float, vector, or string literal expected but , found instead.


Can anyone see what could be the problem?!?!?!?!?


Mike



--

Mike
xmw### [at] millennianetcom - remove the x for replies
For 3D pictures and animations
http://www.geocities.com/siliconvalley/pines/8625


Post a reply to this message

From: Mike Weber
Subject: Re: help with #read
Date: 27 Nov 1998 23:17:13
Message: <365f7949.0@news.povray.org>
I figured it out - it always happens like this.  After I post the question
or problem, I figure it out.

For this one, I needed commas (sp?) at the end of each line.

Mike

Mike Weber wrote in message <365f4288.0@news.povray.org>...
>I'm using the new #read in POV 3.1 but its not working for me.  I'm read
>X,Y,Z data from a file and I get an error on the third line below:
>
>-16.00000,95.00000,0.00000
>-8.00000,89.00000,0.00000
>0.00000,82.00000,0.00000  <<< this line
>6.00000,75.00000,0.00000
>12.00000,67.00000,0.00000
>18.00000,60.00000,0.00000
>23.00000,52.00000,0.00000
>27.00000,44.00000,0.00000
>
>
>Here is the line I'm using to read the data from the file:
>
> #read (XYZDATA, dataX, dataY, dataZ)
>
>
>I don't understand why it can read the first two lines,
>but gives me this error on the third:
>
> #read (XYZDATA, dataX, <---- ERROR
>
>error: float, vector, or string literal expected but , found instead.
>
>
>Can anyone see what could be the problem?!?!?!?!?
>
>
>Mike
>
>
>
>--
>
>Mike
>xmw### [at] millennianetcom - remove the x for replies
>For 3D pictures and animations
>http://www.geocities.com/siliconvalley/pines/8625
>
>


Post a reply to this message

From: Nieminen Mika
Subject: Re: help with #read
Date: 30 Nov 1998 13:20:38
Message: <3662e1f6.0@news.povray.org>
Mike Weber <xmw### [at] millennianetcom> wrote:
: For this one, I needed commas (sp?) at the end of each line.

  Yes. Povray doesn't care about spaces or newlines. You have to put a
comma after each element.

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: Rudy Velthuis
Subject: Re: help with #read
Date: 28 Jan 1999 06:35:23
Message: <36b04b7b.0@news.povray.org>
Nieminen Mika schrieb in Nachricht <3662e1f6.0@news.povray.org>...
>Mike Weber <xmw### [at] millennianetcom> wrote:
>: For this one, I needed commas (sp?) at the end of each line.
>
>  Yes. Povray doesn't care about spaces or newlines. You have to put a
>comma after each element.


Ah, it took me a while to see why the second line didn't create the error
then. I suppose it is because 0.0000<cr>-8.0000 was interpreted as 0-8
instead of two distinct values 0 and -8. So the X,Y,Z triples would have
been wrong anyway.

Does this mean, that every value that is #read is immediately interpreted,
before it is processed any further?

--
Rudy Velthuis


Post a reply to this message

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