Hi Jerry: I am going to respond to the mailing list since (potential) Ada users should be interested.
On 2007-07-01 17:05-0700 [EMAIL PROTECTED] wrote: > Hi Alan, > > Here is a patch which includes the new binding which uses the traditional > object names. I have committed both your patch and two subsequent fixups. (I wrapped a function call that was too long [256 was mentioned in the error message so I assume it exceeded 256 characters on the line] for my version of Ada and straightened out a minor problem with ada_STRING_INDICES.) The results for me on Debian sarge with current svn trunk are the Ada bindings and examples build without problems (for -DENABLE_ada=ON) and for the existing examples 1, 10, and 12, the traditional and thick Ada implementations give identical examples to each other and to the C implementation. So all seems to be well, but please check svn trunk for yourself. > I have also kind of made the examples 01, 10, and 12 more > consistent in several ways, and the traditional-name examples (e.g. x01a.adb) > were generated automatically from the new-style versions. The "traditional" > examples now use the new binding, PLplot_Traditional.adx and procedures now > accept string arguments that do not require conversion to C-style strings. That and the redacted form of function calls are really nice improvements that will make life a lot easier for users of the traditional Ada interface to PLplot. > [...]In making the traditional binding, which uses the same subprogram names > as > the thin binding (the traditional binding invokes the thin binding), there of > course arose a name clash which is easily solved by not "use-ing" the thin > binding, PLplot_thin. In Ada, the "with" clause makes a package visible and > the "use" clause collapses the namespace. So all that is necessary in both > the traditional binding and the traditional examples is to not use the "use" > clause for PLplot_Thin but to precede every object name (subprogram, type, > constant) therefrom with the PLplot_Thin package name using dot notation. So > for example in a traditional example, the constant PL_PARSE_FULL might be > used. Since this is declared in the thin binding, it now has to be accessed > by PLplot_Thin.PL_PARSE_FULL. Similarly, I've provided a string of length 80 > which was called String_80 but now needs to be called PLplot_Thin.String_80. We have a similar situation for the python modules, There is a private "_plplot" module which we wrap with a much easier to use "plplot" module, and the examples only use the plplot version and completely ignore the private module. We also are very careful not to document that private python module since there is no point in the user being distracted by that module. Thus, by analogy with the python case I feel the Ada thin binding should be completely ignored in both the thick and traditional examples. Of course, by ignoring the thin binding in the examples we lose the option of using the full-argument variation of the function calls in the examples, but that is a good thing since the redacted form in the traditional and thick interfaces makes more sense, and I don't think we currently use the full-argument variation right now in any case. Of course, to make ignoring the thin interface in the examples work, you would have to define PL_PARSE_FULL and String_80 directly for the traditional binding, but I assume that is all you would have to do, and the change should therefore be easy for you to implement. I am very pleased about how things are shaping up with the Ada bindings and examples. Once the thin interface can be ignored in the examples, and we have a sed script to transform between traditional and thick examples, then we should be in excellent position to fill in the rest of the standard set of examples for Ada. That will not only be a good test of both the traditional and thick interfaces (and the private underlying thin interface those two depend on), but also will be the signal that the Ada interface has matured from an experimental interface to a standard interface that we can turn on by default and actually install. 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 __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel