denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Documentation of Scheme interface


From: Richard Shann
Subject: Re: [Denemo-devel] Documentation of Scheme interface
Date: Fri, 03 Oct 2008 17:50:39 +0100

On Fri, 2008-10-03 at 11:34 -0500, Jeremiah Benham wrote:
> ok. Do you think it should return a string or is an int fine. I clefs
> names are stored in an enum. I think I would have to write a function
> to
> return a string value. I saw that you wrote a define in denemo_types.h
> but this is for an array. Should I write an array and have the value
> looked up by the inter value corresponding with the enum clef value?
Yes, just to emphasize specify 0 for the first value & put in the
warning about the array of strings. (There may be a neater way of doing
this which I have forgotten about, or never heard of, but this is C).
(If you worry about wasted memory, the compiler knows which static
arrays are never accessed and will chuck them away, even though in the
scheme of things, this is miniscule).
>  Or
> should I just have the function return an int.  
Return a string: make it a rule that the built-in Denemo commands return
a boolean (#t for the normal thing happened, #f for the exceptional
case(s)), while everything else returns a string.

Richard






reply via email to

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