POV-Ray : Newsgroups : povray.newusers : #fopen and #read troubles : #fopen and #read troubles Server Time
6 Sep 2024 04:23:05 EDT (-0400)
  #fopen and #read troubles  
From: david sharp
Date: 22 Feb 1999 13:08:00
Message: <36D19BA3.7A40@interport.net>
I am having a hard time getting 
#fopen/#read in version 3.1a, MS-DOS,
to work like I expect.

Can anybody take the time to tell me
what is wrong with the following? 


My scene file looks like this:
==============================
#declare R0=4;
#declare n=0; 

#fopen PathFile "8_2_11a.dat" read
union{
  
  
  #while (defined(PathFile))

    #read (PathFile, xx, yy, zz)
    
    sphere{<xx,yy,zz>,R0}

    #declare n=n+1;
  #end

  texture{Path0_tex}
}

#fclose(PathFile)

==================================

the file 8_2_11.dat looks like this:
=======================================
33.233795,-89.718941,32.003906,
69.594879,7.195656,-8.293076,
-50.495758,101.845917,-35.317207,
-80.023605,68.077423,-19.941116,
-5.417503,16.675690,-6.008537,
8.868011,30.237213,-12.376640,
2.900688,23.989487,-88.818932,
60.252716,79.018677,-35.281281,
24.128769,107.299164,-43.336853,
6.070969,89.397400,-34.994446,
12.038376,95.645020,41.448578,
-20.985031,62.907074,56.705780,
-32.920090,50.411514,-96.181236,
-86.662827,-2.535072,7.846359
=================================

I am consistently getting this error message
from POVRay (3.1a, MSDOS):
=========================
  #while
(defined(PathFile))                                                  
    #read
(PathFile,xx20                                                      
 33.233795,yy,
<----ERROR                                                     
 8_2_11a.dat:2: error: float, vector, or string literal expected
 but ,  found instead. 

=======================


Post a reply to this message

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