Re: Universal default value function

2021-01-25 Thread Graham King
> On 25 Jan 2021, at 08:02, Andrew Bernard wrote: > >  This exact thing came up on the list before I'm sure. Maybe the thread starting here: https://lists.gnu.org/archive/html/lilypond-user/2014-02/msg00033.html > > A case of where we need some sort of repository of this sort of knowledge.

Re: Universal default value function

2021-01-24 Thread Andrew Bernard
This exact thing came up on the list before I'm sure. A case of where we need some sort of repository of this sort of knowledge. Mailing lists archives are not exactly the right platform for storage abd search of code idioms and samples. Just musing. Andrew Vaughan McAlley wrote on

Re: Universal default value function

2021-01-24 Thread Vaughan McAlley
Thanks Aaron! On Mon, 25 Jan 2021 at 15:54, Aaron Hill wrote: > Did you mean to attach or include a code snippet? Hard to spot any > problem without it. :) > Oops, guilty as charged. > Regardless, review the following: > > > \version "2.22.0" > > valueOrDefault = >

Re: Universal default value function

2021-01-24 Thread Aaron Hill
On 2021-01-24 8:17 pm, Vaughan McAlley wrote: Hi, I am trying to write a function that will accept a symbol and a value, and assign that value to the symbol *if the variable has not already been defined *(such as in an include file). At the moment, it runs without complaining, but the result

Universal default value function

2021-01-24 Thread Vaughan McAlley
Hi, I am trying to write a function that will accept a symbol and a value, and assign that value to the symbol *if the variable has not already been defined *(such as in an include file). At the moment, it runs without complaining, but the result is always "bar", the default value. Can anyone