Hi Alan,
I tested it with Intel Fortran 2012 and that accepts the third argument.
I do not know by heart if we use the one-argument version of size(), but if so,
then you need to take care of the kind argument by using its name:
Integer, dimension(10) :: dummy
Write(*,*) size(dummy, kind=plint)
I would say, let's go for this amendment. If some compiler out there does not
like it, there is a workaround possible, though I'd rather not have to go that
route :).
Regards,
Arjen
> -----Original Message-----
> From: Alan W. Irwin [mailto:[email protected]]
> Sent: Saturday, October 11, 2014 12:00 AM
> To: Arjen Markus; PLplot development list
> Subject: Re: [Plplot-devel] Fortran 95 changes in progress
>
> Hi Arjen:
>
> Can you comment on what should be done with size calls in our Fortran code?
> Typically, such calls are used in, e.g.,
>
> call plshade07(z, size(z,1), size(z,2), ...
>
> where the sized arguments map to PLINT C types. So being absolutely rigourous
> about this, those size calls should be coerced into returning a kind=plint
> result. For
> Fortran 2003 (according to the gfortran
> documentation) an optional 3rd kind argument was introduced for the size
> function to
> do such coercions on the the kind of integer that was output by size. So the
> case
> above and similar calls could be changed to
>
> call plshade07(z, size(z,1,plint), size(z,2,plint), ...
>
> One might argue that surely such an absolutely trivial extension that is
> blessed as
> part of the Fortran 2003 standard should now be part of all Fortran compilers
> a
> decade after that standard was adopted.
> However, I surveyed some documention for various fortran compilers for
> whether an
> optional 3rd kind argument was supported for size, and the results were
> ambiguous.
>
> "info gfortran" says yes for gfortran.
> <http://polyphys-s01.ethz.ch/MK/ifort.pdf> says yes for ifort.
> <http://www.absoft.com/literature/Fortran%20Reference.pdf> says no for
> absoft, but I
> don't know how current that documentation is.
> An old version of pgifortref.pdf that I had downloaded from the Portland
> Group in
> 2006 (!) documented size as not having a 3rd argument. However, the modern
> version of that same documentation at http://www.pgroup.com/resources/docs.htm
> has unfortunately been dumbed down so it doesn't document size at all and
> similarly
> for the other useless modern versions of manuals collected there!
>
> So the score so far is gfortran and ifort yes, absoft maybe not, and portland
> group
> completely unknown due to bad documentation. Do you have additional
> information
> for whether absoft, portland group, or any other fortran compilers support
> the 3rd
> optional kind argument to size?
>
> Based on my evidence and anything else you can come up with, let me know what
> you decide is the best strategy to use here, and I will implement this third
> argument
> to size or not following whatever you decide is right for now.
>
> 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
> __________________________
DISCLAIMER: This message is intended exclusively for the addressee(s) and may
contain confidential and privileged information. If you are not the intended
recipient please notify the sender immediately and destroy this message.
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The
Netherlands, Commercial Registration Number 41146461, is not liable in any way
whatsoever for consequences and/or damages resulting from the improper,
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel