Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-12-11 Thread Matthew Fong
Hello Aaron, This makes sense, and the let statement is something I was missing (!) mattfong On Fri, Dec 11, 2020 at 12:54 PM Aaron Hill wrote: > On 2020-12-11 12:30 pm, Matthew Fong wrote: > > Hello Aaron, > > > >> .< Oh boy, that is *simple*. I went off the deep end on this, trying > >> to

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-12-11 Thread Aaron Hill
On 2020-12-11 12:30 pm, Matthew Fong wrote: Hello Aaron, .< Oh boy, that is *simple*. I went off the deep end on this, trying to make another variable that would get assigned the color. That clearly is not the way Scheme works. The inline conditional is a thing of beauty. Looks like I need

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-12-11 Thread Matthew Fong
Hello Aaron, >.< Oh boy, that is *simple*. I went off the deep end on this, trying to make another variable that would get assigned the color. That clearly is not the way Scheme works. The inline conditional is a thing of beauty. Looks like I need to spend more time studying Scheme syntax.

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-12-11 Thread Aaron Hill
On 2020-12-11 10:43 am, Matthew Fong wrote: Hello everyone, Resurrecting an old thread. I've been trying my hand in Scheme programming, via small examples on the project I'm working on. I wanted to extend the variable list to this function Harm wrote, to take an extra boolean variable,

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-12-11 Thread Matthew Fong
Hello everyone, Resurrecting an old thread. I've been trying my hand in Scheme programming, via small examples on the project I'm working on. I wanted to extend the variable list to this function Harm wrote, to take an extra boolean variable, which is pretty trivial. The boolean is meant to

RE: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread John Schlomann
Ah, thank you much. John > -Original Message- > From: Thomas Morley [mailto:thomasmorle...@gmail.com] > Sent: Saturday, October 17, 2020 3:14 PM > To: John Schlomann > Cc: David Kastrup; Jean Abou Samra; Matthew Fong; lilypond-user > Subject: Re: Scheme help request: How can else of an

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Matthew Fong
Thanks for the pointer, Harm. Matt On Sat, Oct 17, 2020 at 13:14 Thomas Morley wrote: > Am Sa., 17. Okt. 2020 um 22:09 Uhr schrieb John Schlomann > : > > > > Harm, > > > > You used a function or macro called add-text. I can't seem to find it in > any LilyPond or Guile manual. What is that? > >

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Thomas Morley
Am Sa., 17. Okt. 2020 um 22:09 Uhr schrieb John Schlomann : > > Harm, > > You used a function or macro called add-text. I can't seem to find it in any > LilyPond or Guile manual. What is that? > > John Hi John, you'll find it in lily-library.scm Cheers, Harm

RE: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread John Schlomann
Harm, You used a function or macro called add-text. I can't seem to find it in any LilyPond or Guile manual. What is that? John > -Original Message- > From: lilypond-user [mailto:lilypond-user- > bounces+jschlomann=wideopenwest@gnu.org] On Behalf Of Thomas > Morley > Sent:

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Thomas Morley
Am Sa., 17. Okt. 2020 um 20:33 Uhr schrieb David Kastrup : > > Thomas Morley writes: > > > Am Sa., 17. Okt. 2020 um 19:39 Uhr schrieb Jean Abou Samra > > : > >> > >> The point of interpret-markup is to turn a markup into a stencil, so I'd > >> use empty-stencil: > >> > >> \version "2.20.0" > >>

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread David Kastrup
Thomas Morley writes: > Am Sa., 17. Okt. 2020 um 19:39 Uhr schrieb Jean Abou Samra > : >> >> The point of interpret-markup is to turn a markup into a stencil, so I'd >> use empty-stencil: >> >> \version "2.20.0" >> >> #(define-markup-command (print-if-defined layout props sym text) >>

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Matthew Fong
Hello Jean and Thomas, Thank you -- both solutions are insightful and useful in future solutions. I did not know about empty stencils, and I read about a void-function earlier, but was not entirely sure how to utilize it. Many thanks, mattfong On Sat, Oct 17, 2020 at 10:49 AM Thomas Morley

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Thomas Morley
Am Sa., 17. Okt. 2020 um 19:39 Uhr schrieb Jean Abou Samra : > > Hi, > > Le 17/10/2020 à 19:27, Matthew Fong a écrit : > > > Hello Richard, > > > > I just discovered your explanation is in fact the case, and also > > concluded cond wouldn't work either. > > > > I might have to settle for an empty

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Jean Abou Samra
Hi, Le 17/10/2020 à 19:27, Matthew Fong a écrit : Hello Richard, I just discovered your explanation is in fact the case, and also concluded cond wouldn't work either. I might have to settle for an empty markup block for now. The point of interpret-markup is to turn a markup into a

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Matthew Fong
Hello Richard, I just discovered your explanation is in fact the case, and also concluded cond wouldn't work either. I might have to settle for an empty markup block for now. Many thanks, mattfong On Sat, Oct 17, 2020 at 9:55 AM Richard Shann wrote: > On Sat, 2020-10-17 at 09:34 -0700,

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Richard Shann
On Sat, 2020-10-17 at 09:34 -0700, Matthew Fong wrote: > Hello everyone, > > No less than 10 minutes after, I discovered I skipped the section on > cond. That solves everything! I think you are missing something here: the if macro in Scheme does not require an else expression (if a b) is fine,

Re: Scheme help request: How can else of an if-statement be made to do nothing?

2020-10-17 Thread Matthew Fong
Hello everyone, No less than 10 minutes after, I discovered I skipped the section on cond. That solves everything! Many thanks, mattfong On Sat, Oct 17, 2020 at 9:27 AM Matthew Fong wrote: > Hello everyone, > > I've been digging into guile/scheme and LilyPond, and it doesn't appear > that