Hi Jerry:

I have changed the subject line because after giving the (short)
answer to your question I am evolving this discussion into a different
direction that deserves a separate subject line.

On 2011-03-08 02:51-0700 Jerry wrote:

> I wonder if someone could take a look at the API documentation for
pllegend which has some problems. For example, the parameter position
is not described at all, and the parameters bg_color, bb_style, nrow,
ncolumn all have the same description.

It's on my agenda to fix that.

> Also, the Ada bindings are sensitive to whether * parameters are input 
> arrays, output arrays, both input and output arrays, or output scalars, and 
> the docs are the only (or easiest) way that I can figure this out. (How do C 
> programmers know?). I don't see any mistakes in this respect yet but I 
> thought I would mention it just in case.

The const modifier (used when the C array is input only) _should_ help you
to figure that out. For example, I used const for all arrays in the
pllegend case because they are all input-only.

However, for lots of the other functions in our API, we have been
sloppy about that issue.  For example, almost all array arguments for
our API are input only, but we have seldom used the const modifier to
demonstrate that.

I think cleaning up our libplplot interface by using the const
modifier for arrays whenever appropriate would be a good idea.
Obviously this change would require substantial propagation effort,
and might even require a soversion bump (if it constitutes a
backwards-incompatible API change).  But a cleaner PLplot interface is
worth having in my view.

What do others here feel about this proposed change?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to