|
|
I was reading a CSV file successfully until povray ran into the next to last
line below. (There were dozens of lines before it which were read successfully
as well, dozens after of similar format to the last line. )
-0.126,-2.53681E-06,49668.6783795397
-0.108,-2.14271E-06,50403.4610376579
-0.09,-1.77115E-06,50814.442593795
-0.072,-1.42709E-06,50452.3190548599
-0.054,-1.05761E-06,51058.5187356398
-0.036,-6.98572E-07,51533.7001769324
-0.018,-3.47316E-07,51826.0028331548
0,-1.8643E-09,0
0.018,3.49041E-07,51569.8728802634
Error message,
// "huhnomarks2.csv" line 52: Parse Error: Expected 'float, vector, or string
literal', , found instead
// Render failed"
I'm not at all confident I have the code below in a concise or correct solution
to the problem. I also have read in some doc or wiki that the CSV file quoted
above is not in the correct format. Just sad that it got this far and then
bombed.
#fopen MyFile "huhnomarks2.csv" read
#debug "got to line 7 \n"
#declare Vee=array[300]
#declare I2=array[300]
#declare I3=array[300]
#declare I4=array[300]
#declare n=0;
#while(n<300)
#declare Vee[n]=0;
#declare I2[n]=0;
#declare I3[n]=0;
#declare I4[n]=0;
#declare n=n+1;
#end
#declare JunkText=""
#read(MyFile)
#read(MyFile)
#debug "got to line 18 \n"
//#read(MyFile,JunkText,",")
#debug "got to line 22 \n"
// #read(MyFile,JunkText,CurveTitle)
#read (MyFile,Vkeed,Ik2d,Ik3d)
//#read(MyFile,IsitV,IsitI2,IsitI3,IsitI4)
#debug "got to line 25 \n"
#declare n=0;
#while (defined(MyFile))
#read (MyFile,Veed,I2d,I3d)
#declare Vee[n]=Veed;
#declare I2[n]=I2d;
#declare I3[n]=I3d;
#declare n=n+1;
#end
Post a reply to this message
|
|