POV-Ray : Newsgroups : povray.advanced-users : File I/O handling... : Nope, doesn't work Server Time
29 Jul 2024 10:20:37 EDT (-0400)
  Nope, doesn't work  
From: Tim Nikias
Date: 4 Aug 2002 11:09:54
Message: <3d4d43c2@news.povray.org>
Damn! It still doesn't work!

Problem is this:
When only one vector is saved in the file, the system
doesn't move on. With two vectors, it begins, but with
only one... Here's the code:

 #fopen _Seed_Origin concat("seedfile.",_VegI) read
 #fopen _Seed_Dump "veg_dump.tmp" write

 #local _Seed_Index=0; //Keeps track if first vector was saved...
 #local _Read_Seeds=0; //Keeps track of overall read vectors

 #while (defined(_Seed_Origin))
  #read (_Seed_Origin, _ISeed)
  #if (defined(_Seed_Origin) | defined(_ISeed))
   #local _Read_Seeds=_Read_Seeds+1;
   #if (_Seed_Index)
    #write (_Seed_Dump, ",",_ISeed) #else
    /*E*/ #write (_Seed_Dump, _ISeed) #local _Seed_Index=1; #end
  #end
  #undef _ISeed
 #end

 #fclose _Seed_Origin
 #fclose _Seed_Dump

The _Seed_Index just takes care of placing the comma
between the vectors to make POV able to read the
different vectors.

When the Seed_Origin file is empty, POV will crash
on the line marked with /*E*/ and state:
Parse Error: Expected 'string', undeclared identifier '_ISeed'
found instead.

Didn't I check for that "undeclared identifier" with
defined(_ISeed)?

I think something is definitely not working they way it
is explained by the error and in the documentation...?

Anyone got a clue what to do?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

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