On 23/05/2020 06:06, Michael Gerdau wrote:
Big deal. I won't ask what's in voiceTrombone.ily.
A variable declaration. You know - EXACTLY THE SAME as C programmers
often stick in .h files ...
I don’t think that’s correct.
For one according to my understanding LP has no variable declarations
whatsoever, only definitions.
I think I'm getting confused :-) no change there :-)
For two LP allows for an arbitrary number of definitions of the same variable,
the latest (as of the parser) overriding any previous. In C there’s just one
definition and an arbitrary number of repetitions of the same declaration.
int i = 1;
enum something = {
a = 1;
b = 2;
c = 3;
}
voiceTromboneI = \relative c { c d e f g a b c }
Forgive my rusted solid C syntax - I can't remember it properly :-)
The two languages may be different, but my mental view of the Computer
Science behind them tells me to treat them the same. I declare them in
an include file, and use them where I need them.
(Whether the language treats them as such, the theory says they are
global constants...)
Cheers,
Wol