|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When attempting to read an empty file (the file is
there, but containing not a single character)
like this:
#read (File, _PreviouslyUndeclared)
I'd expect defined(_PreviouslyUndeclared) to return
false.
It doesn't.
If I check the file before any reading with defined(File),
I get a true, after attempt to read, I get false, but
not only when the file is empty, but also when reading
the last data.
E.g.: A file filled with 3 vectors. If I check defined(File)
before and after reading, I get 3 true for the check before,
but only two true for the check after reading.
Checking if (_PreviouslyUndeclared) is defined results in
true all the time.
So. Is this really what I should expect?
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim Nikias" wrote:
> When attempting to read an empty file (the file is
> there, but containing not a single character)
> like this:
> #read (File, _PreviouslyUndeclared)
>
> I'd expect defined(_PreviouslyUndeclared) to return
> false.
> It doesn't.
_PrevioslyUndeclared is defined but it is not initialised (Did I use the
right words?)
> If I check the file before any reading with defined(File),
> I get a true, after attempt to read, I get false, but
> not only when the file is empty, but also when reading
> the last data.
>
This does only happen when you dont have a comma behind the last data item.
>
> So. Is this really what I should expect?
>
?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks for both answers, I'll check what you mentioned
and reply sometime later again...
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
"Simon Adameit" <gom### [at] gmxde> schrieb im Newsbeitrag
news:3d4d5bfd@news.povray.org...
>
> "Tim Nikias" wrote:
> > When attempting to read an empty file (the file is
> > there, but containing not a single character)
> > like this:
> > #read (File, _PreviouslyUndeclared)
> >
> > I'd expect defined(_PreviouslyUndeclared) to return
> > false.
> > It doesn't.
>
> _PrevioslyUndeclared is defined but it is not initialised (Did I use the
> right words?)
>
> > If I check the file before any reading with defined(File),
> > I get a true, after attempt to read, I get false, but
> > not only when the file is empty, but also when reading
> > the last data.
> >
> This does only happen when you dont have a comma behind the last data
item.
>
> >
> > So. Is this really what I should expect?
> >
>
> ?
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Its finally working!
I never thought that the files would need that extra
comma to work. IMHO its may be easier for
a starter (simply append to file with Data+",") but
I think it would make more sense if defined(File)
would return false if no data follows, not if no
data follows after a comma.
Ah well. It was probably thought of some long time
ago, and I don't want to start a debate about such
small things.
But some note in the docs would perhaps be of some
help? Ingo?
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
"Tim Nikias" <tim### [at] gmxde> schrieb im Newsbeitrag
news:3d4d6b8d@news.povray.org...
> Thanks for both answers, I'll check what you mentioned
> and reply sometime later again...
>
> Regards,
>
> Tim
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
> "Simon Adameit" <gom### [at] gmxde> schrieb im Newsbeitrag
> news:3d4d5bfd@news.povray.org...
> >
> > "Tim Nikias" wrote:
> > > When attempting to read an empty file (the file is
> > > there, but containing not a single character)
> > > like this:
> > > #read (File, _PreviouslyUndeclared)
> > >
> > > I'd expect defined(_PreviouslyUndeclared) to return
> > > false.
> > > It doesn't.
> >
> > _PrevioslyUndeclared is defined but it is not initialised (Did I use the
> > right words?)
> >
> > > If I check the file before any reading with defined(File),
> > > I get a true, after attempt to read, I get false, but
> > > not only when the file is empty, but also when reading
> > > the last data.
> > >
> > This does only happen when you dont have a comma behind the last data
> item.
> >
> > >
> > > So. Is this really what I should expect?
> > >
> >
> > ?
> >
> >
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|