POV-Ray : Newsgroups : povray.advanced-users : #write(outfile,chr(0)) doesn't work. A bug? : Re: #write(outfile,chr(0)) doesn't work. A bug? Server Time
2 Nov 2024 11:26:24 EDT (-0400)
  Re: #write(outfile,chr(0)) doesn't work. A bug?  
From: Peter Popov
Date: 20 Oct 1999 12:57:17
Message: <cvMNOMbowGahCw=6R4Yz40U2Ug2w@4ax.com>
On 20 Oct 1999 10:49:11 -0400, Nieminen Juha
<war### [at] punarastascstutfi> wrote:

>  I was trying to make a pov script which could create its own .df3 file.
>However, this seems to be impossible since for some reason povray refuses
>to write the value 0 to the file. Every other value (1-255) can be written
>but not 0.
>  What's going on here? Is it a bug or an intentional feature?

It's a limitation of the function used (fprintf()?). I hit this wall
about a year ago and thankfully PoD made his tga2df3 utility just in
time.

The file I/O directives were designed to work with ASCII files -- ini,
pov, inc, txt etc. to help carry data between frames, change ini
settings etc. You know that in an ASCII file EOF is '\0' so you see
how the limitation of fprintf() could easily have been overseen by the
Team.


Peter Popov
ICQ: 15002700


Post a reply to this message

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