|
|
When I render the scene given below, I get the error message "unexpected end
of file". This only happens when there comes absolutely nothing after
"#end". As soon as I put in a space or a new line the scene will render.
POV-ray for windows 3.1 r1
WinNT 4 & SP3
PII 233 64mb
regards,
ingo
#include "colors.inc"
light_source {
<0, 500,-500>
color rgb <1, 1, 1>
}
camera {
location <0.0, 1.0, -2.0>
look_at <0.0, 1.0, 0.0>
angle 90
}
#declare Count= -2;
#while (Count<=2)
cylinder {
<0,0,0>,<0,2,0>,0.02
translate <Count,0,0>
texture {
pigment {color White}
finish {diffuse 1}
}
}
#declare Count= Count+0.5;
#end
Post a reply to this message
|
|
|
|
On Sun, 27 Sep 1998 23:22:38 +0200, ingo <ing### [at] ingodemonnl> wrote:
>When I render the scene given below, I get the error message "unexpected end
>of file". This only happens when there comes absolutely nothing after
>"#end". As soon as I put in a space or a new line the scene will render.
This is a common problem for a lot of languages. So much so, in fact, that
people in at least one other newsgroup will tell you that if your editor
allows you to create a text file with no newline after the last line, then
the flaw lies in your editor, not in the parser. I tend to agree with them.
Post a reply to this message
|
|
|
|
It is so easy to change a parser to check for this condition
that the fact it is a common problem doesn't make it not a problem,
however.
There are valid reasons that one might want to omit a newline
from a file end. But I can think of no reason a parser
would not want to conclude EOF was a line terminator (unless
this is viewed as some sort of scheme to catch truncated
files)
So I agree with "ingo" that this is validly called a bug.
Dan
P.S. Thanks for the LINUX port, but that's for another group...
Ron Parker wrote:
> This is a common problem for a lot of languages. So much so, in fact, that
> people in at least one other newsgroup will tell you that if your editor
> allows you to create a text file with no newline after the last line, then
> the flaw lies in your editor, not in the parser. I tend to agree with them.
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|