lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identify included files


From: antlists
Subject: Re: Identify included files
Date: Sat, 23 May 2020 10:03:00 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]