POV-Ray : Newsgroups : povray.programming : File load failure : File load failure Server Time
3 Jul 2024 05:52:23 EDT (-0400)
  File load failure  
From: AngleWyrm
Date: 28 Jan 2004 07:56:19
Message: <4017b173$1@news.povray.org>
So I'm trying to load a datafile that consists of about 10,000 lines of
three values each. BUT the program only seems to load between 4,880 and
4,998 or so. Do you see anything wrong with this loading routine, or is it
my data/computer?

//////////////////////////////////////////////////////////
// Load the data file
//
#fopen dataFile "d:/docs/raytracing/redshiftData.txt" read

#declare LinesInFile = 10000;
#declare celestialData = array[3][ LinesInFile ];

#declare i = 0;
#while ( defined(dataFile) )

    #declare rightAscentionAsDegrees = 0.0;
    #declare declinationAsDegrees = 0.0;
    #declare zVal = 0.0;

    #read( dataFile, rightAscentionAsDegrees, declinationAsDegrees, zVal )

    #declare celestialData[0][i] = rightAscentionAsDegrees;
    #declare celestialData[1][i] = declinationAsDegrees;
    #declare celestialData[2][i] = zVal;

    #declare i = i+1;
#end
    #debug concat( "\n\nTotal values read from file: ", str(i,5,0), "\n\n" )
#fclose dataFile


Post a reply to this message

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