On 2017-12-27 14:26-0800 Alan W. Irwin wrote:

Hi Arjen:

I have done some further investigation and it appears that even today
allocatable character arrays are problematic to a certain extent for
Fortran compilers. For example, see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80945>. I have no clue
whether that particular modern gfortran bug would affect us.  However,
the existence of such bug reports for a modern version of a Fortran
compiler indicates we should proceed with caution with allocatable
character arrays.

Therefore, once we implement allocatable character array variants of
plget_arguments and plparseopts we should survey the modern versions
of gfortran, ifort, and nagfor to see which of those work well with
that API.  Also we will likely want to retain the the current static
assumed shape character arrays API's for those functions for a while
so that users with access only to older Fortran compilers (e.g.,
gfortran-4.9.2) that are unreliable with the allocatable character
array approach have a plget_arguments and plparseopts API that
they can use.

Hi Arjen:

I have just pushed commit 6f2f4e4 to master which implements dynamic
length and size as well as static length and dynamic size variants of
plget_arguments and plparseopts.  The former does not work with
gfortran-4.9.2, but the latter (as well as the static length and size
variants implemented before) works well.  For more details about how
these tests should be done and results for gfortran-4.9.2, please see
the revised version of README.release section 2.7.2.

This commit completes my parsing API changes in bindings/fortran/*.f90
and my changes to examples/fortran/x01f.f90 to test all of these
parsing API's.  I would appreciate your review of my implementation.
Furthermore, I would appreciate you following the parsing testing
advice in README.release section 2.7.2 to discover which parts of this
API work for gfortran with version > 4.9.2 (e.g., for your Cygwin
and MinGW-w64/MSYS2 platforms) as well as the ifort
compiler you have access to (and possibly the nagfor compiler you have
arranged access to in the past).

By the way, I am not sure of the correct terminology for character
arrays that have both length and size allocated.  I refer to them
above as "dynamic length and size", but I have also seen the
term "deferred-length" used for character strings with allocated
length.

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
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to