On 2011-01-27 08:42+0100 Arjen Markus wrote:

> Hi Alan,
>
> wow, that is quite a set of changing. Yes, the examples were filled
> with local definitions of parameters like PL_PARSE_FULL and so on.
> Having them in a single include file will make it easier for our users.
> I agree that a similar route be taken for Fortran 95, even though we
> can rely on the module to convey the information.
>

Hi Arjen:

I have the sed script almost working for f95.  The only problematic
statement generated is

       integer, parameter :: PL_FCI_MARK = z'80000000'

That z'80000000' causes an integer overflow.  The problem is that
z'80000000' is not a normal 4-byte integer.  Assuming twos-complement
integers, then the negative of that number is also z'80000000'.  That
is, it is a "negative" zero or zero with the sign bit set. Do you know
how to put that exact pattern of bits into a 4-byte integer in fortran?

For now, I have simply dropped PL_FCI_MARK (since it is not used in
any of the examples), but it would be nice to include it for
completeness if you can figure out an equivalent of the above
parameter statement that will put that exact pattern into the
PL_FCI_MARK 4-byte integer.

Also, could you comment on BOZ constants used in parameter statements
such as

integer, parameter :: PL_FCI_SERIF = z'1'

gfortran is happy to accept those, but I am not sure other Fortran
compilers are able to.  The issue is that hexadecimal constants are
sometimes used in plplotcapi.i (and the equivalent #defines in
include/plplot.h) so I have converted those to the BOZ form using the
sed script.  If the BOZ form is not acceptable to some Fortran
compilers in the above context, then I could use a python script to do
the conversions from hexadecimal constants to decimal constants.

Further changes to the Fortran 95 examples are required by this sed
script approach since you cannot have local parameters in the examples
trying to override the parameter values set by the module.  So with
luck it should only be a matter of removing all those local parameters
that are set in the Fortran 95 examples, testing to make sure
everything works as before, then doing the commit. I plan to continue
with those steps after I get some sleep.

> I am currently translating example 33, which will also require an
> interface to plcolorbar(), but I will not be able to finish it
> of course before the foreseen changes to the API.

Just getting the pllegend part of it done for now is one possible
approach.  However, it probably would not waste your time to complete
the example for now just to confirm it gives identical to C results.

Of course, I anticipate as a result of Hez's work, and my further
position work with plcolorbar, that the plcolorbar API will change and
the part of C example 33 corresponding to plcolorbar will expand to
more pages.  But it should be relatively straightforward to propagate
those anticipated changes when the time comes if you already have
Fortran 77 and 95 examples that match the current C example 33.

>
> Meanwhile I can make a start with the Fortran 95 and Tcl bindings and
> examples - a lot of the work is independent of the API changes.

I look forward to those improvements.

Best wishes,

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
__________________________

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to