On 2012-01-24 11:35-0000 Andrew Ross wrote: > > Arjen, > > While running make test_diff_psc I've noticed a couple of issues with the > recent changes to the fortran 95 string handling. First one was a typo > with the arguments to achar being reversed which caused C to fortran > string conversions to fail. This is fixed. > > The other is more subtle. Using trim to find the end of fortran strings > will also remove any trailing spaces. This is different to the behaviour > of the C API functions which take strings and leads to differences in > output for examples 20 and 28 which use strings ending in spaces. > > I'm not sure how to fix this given how fortran strings work, other than > by changing examples 20 and 28 to avoid these trailing strings.
Actually, trailing blanks in character strings do have a significant effect in Fortran. In particular, if a Fortran user wants to put a trailing blank into one of the character string arguments of PLplot, she should be allowed to do so. In fact our Fortran bindings did preserve Fortran trailing blanks up to when a regression was introduced by the recent changes in bindings/f95/strutil.f90. I have now fixed that regression with a one-line change (revision 12152). The result is example 28 (and presumably example 20 which I didn't have time to test) implemented with C and Fortran now give consistent results again. Arjen, please review revision 12152 to make sure it is consistent with the spirit of your recent changes. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
