POV-Ray : Newsgroups : povray.general : #read / #write docs--a suggested clarification : Re: #read / #write docs--a suggested clarification Server Time
29 Jul 2024 02:25:23 EDT (-0400)
  Re: #read / #write docs--a suggested clarification  
From: James Holsenback
Date: 24 Apr 2013 06:16:24
Message: <5177b0f8$1@news.povray.org>
On 04/23/2013 10:22 PM, Kenneth wrote:
>  From strictly an SDL-programming perspective, I find it surprising that the file
> *name* is rarely used in any of the #read/#write commands (except for #fopen.) I
> would expect it to be, but no, the FHI is used instead. This relatively odd
> situation might be contributing to the lack of clarity. Of course, that's the
> way the stuff works. Maybe a simple sentence could be added to point this out.

SDL follows other programming languages fairly closely in that fopen (in 
this case) returns a /pointer/ to the variable FILE_HANDLE_IDENTIFIER 
... here's a php example to illustrate what I'm talking about:


$HtmlOut = fopen ("documentation/".$FileBrand."/".$OutFile.".html", "wt");

then when I write to or close the file:

fwrite ($HtmlOut, $Page);
fwrite ($HtmlOut, $FixedPanel);
fwrite ($HtmlOut, "<div class=\"Content\">\n");

fclose ($HtmlOut);

IMHO: I don't think there's a clarification needed here ... sorry


Post a reply to this message

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