|
|
In article <3bd18f62@news.povray.org> , "Rune" <run### [at] mobilixnetdk>
wrote:
>> An #error should not allow a string,
>
> But it requires a string. That must be a bug then?
>
>> but enforce a quoted "something".
>
> A quoted "something" that is not a string? How do you define this in clear
> terms?
There are two different definitions of "string" we are talking about. The
firs one is what POV-Ray allows as a function that defines a string, which
in the POV-Ray parser syntax is simply called "STRING". The second
definition, which I called "quoted something" is simply anything that may
appear between two quotes, but no functions or other tokens.
To show it by example, the following should be legal:
#error "My message"
#error ""
#error "abc"
While these should be illegal:
#error foo
#error this is the error message
#error
The reasoning behind this being a) that the error message is easier to find
in the complex POV-Ray syntax because it gets colored in the most common
editors used to edit pov files and b) that it is easy to find the end of the
error message simply by looking for the second quote so POV-Ray can gibe the
error location at the end of the #error line.
I should note that b) is also the reason why it currently takes a string -
this way the error will point to the end of the #error directive message
rather than the beginning.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|