POV-Ray : Newsgroups : povray.general : #read problems : Re: #read problems Server Time: 19 Aug 2019 14:33:37 GMT
  Re: #read problems  
From: Kenneth
Date: 1 Oct 2018 19:20:02
clipka <ano### [at] anonymousorg> wrote:

> POV-Ray isn't complaining about a missing parameter for `rotate`, it is
> complaining about a missing parameter for `#fclose`".
> You need to specify which file you want to close (you can have multiple
> open at the same time):
>     #fclose FOOBAR

Geez, I apologize: That was my NEWSGROUP syntax error :-/  My real code included
#fclose FOOBAR. (At the time of writing my original post, I was so confused and
frustrated that I was about to toss my machine out the nearest window!!)

I'm curious about something: What is the actual problem when trying to do...

#fopen FOOBAR "my_file.txt" read
#fclose FOOBAR // or this line can be commented-out, with no change

At first glance, this *looks* like it should be simple substitution of the
#written AAA vector into 'rotate' (kind of like the behavior of a macro.) But
this is the situation where the #fopen block appears to be 'invisible' to the
scene code, along with one of the fatal error messages. I'm not yet 'seeing' the
reason for its failure.

[Kenneth wrote:]
> REMOVING the   rotate   keyword, but leaving the #fopen block intact, the
> scene renders OK(!)-- but that seems quite strange: it's again as if the
> code block is non-existent or invisible, when it should be throwing a
> fatal error.

THIS is still a mystery to me-- why it's not throwing an error. But... I'm
beginning to see that the #fopen block itself is just 'idle code', sitting there
in limbo, doing nothing in particular... until AAA is actually used. My guess??

I don't wish to complain TOO much about the documentation at #read, but...

IMO, the original author assumed a level of C or C++ knowledge (or some other
language) on the part of the user, as to the rules and usage of #write/#read.
(Maybe that *was* the case way back when, when the 'typical' POV-user was
probably a computer programmer.) But some useful, basic(?) info has been left
out (yes, 'spoon-feeding', ha.) I remember being similarly stuck and frustrated
years ago, when I first tried using these in POV-ray. That's unfortunate,
because #write and #read are really powerful tools. It would SO nice not to have
to initially run dead-end experiments, simply to arrive at some working code.

Post a reply to this message

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