|
|
clipka <ano### [at] anonymousorg> wrote:
> Why, yes, of course: Start your scene with
>
> #version version; // sic!
> #if (version >= 3.71)
> #define Tau_Is_Reserved = true;
> #else
> #define Tau_Is_Reserved = false;
> #end
> #version 3.7; // minimum version
I haven't had a lot of time to think this through, but was wondering if a "fix"
such as this could be conveniently added into an include file like "consts.inc"
?
> The reason behind this is consistency of 2-dimensional arrays with
> arrays-of-arrays:
That's a great way to explain that.
I'll have to try coding things in macros more often, as it seems to be an
excellent way to clarify a good _mechanism_ by which to do something and
identify a good way to structure the code.
> > Command aliases. A way to tell the parser to treat all instances of a statement
> > as a command to do "X" - just like in a Unix shell.
>
> You mean, something like, say, a... /macro/ ?!
> Yeah, I think it would be neat if POV-Ray had something like that ;)
I actually wanted to add a bit of clarification about this:
Writing a macro is similar to what I was thinking, but the real core of the idea
is to have REAL aliases.
https://en.wikipedia.org/wiki/Alias_(command)
Invoking a macro would have a different syntax than the SDL directive.
If I wanted to use, say, "define" instead of "declare",
my thought was to have something along the lines of #alias {define, declare}
With a macro, I can't write
#define Q = 12345;
and have the parser recognize it.
I'm not pushing for this as a new feature, I just wanted to clearly state my
original suggestion.
And I do realize what a radioactive fustercluck The Parser is.
Post a reply to this message
|
|