lilypond-devel
[Top][All Lists]
Advanced

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

Re: Geting the list of MIDI instrument names


From: Reinhold Kainhofer
Subject: Re: Geting the list of MIDI instrument names
Date: Thu, 21 Feb 2008 15:49:00 +0100
User-agent: KMail/1.9.7

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 21. Februar 2008 schrieb Ralf Mattes:
> > However, the "missing" #t is not a bug, rather a missing optimization.
> > format without a stream designator returns the formatted string, so in
> > this case one really needs a display. However, if you add the stram
> > designator directly to format, it's much shorter (unfortunately, both
> > books on scheme that I have borrowed from the library don't list this, so
> > I didn't know about this until now....).
>
> Are you shure about this? I've to admit that my Scheme is a bit rusty
> (living mostly in Common Lisp these days), but that sounds wrong to me.
> IIRC format with a stream designator of NIL/#f returns the formated string.
[...]
>  Hmm, don't really see how your format invocation could possibly be
>  implemented  ...

Don't ask me how it is done, but at least that's how it works in lilypond:

lilypond -e '(display (string->list (format "abc~sdef" "ffff")))'

prints 

(a b c " f f f f " d e f)

So, apparently, format simply returned the string properly formatted. (Of 
course, I had tried out my sample code before posting it on the mailing list, 
in particular since I'm absolutely new to scheme).

Cheers,
Reinhold


- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHvY9kTqjEwhXvPN0RAnIxAJsGaO8FnpfgSBbGpcytPpw1iZGwhgCgq3DN
eSkyC4fcFIU7U4+3gimuZrs=
=UNvG
-----END PGP SIGNATURE-----




reply via email to

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