[J3] An inquiry about the extension with pointer function reference introduced in Fortran 2008
Malcolm Cohen
malcolm at nag-j.co.jp
Mon Mar 8 00:33:03 UTC 2021
The Introduction is not normative text, and does not contain any requirements. It merely contains information or technical commentary on the contents of the document.
So you can’t make rigorous reasoning from the Introduction. If you want rigorous reasoning, you need to find the normative text elsewhere.
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Vipul Parekh via J3
Sent: Monday, March 8, 2021 9:21 AM
To: General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: Vipul Parekh <parekhvs at gmail.com>
Subject: [J3] An inquiry about the extension with pointer function reference introduced in Fortran 2008
The Introduction section in the 10-007r1 document toward Fortran 2008 states, "A pointer function reference can denote a variable in any variable definition context."
Does the following then conform?
--- begin program ---
module m
integer, target :: x(3) = [ 1, 2, 3 ]
contains
function get() result(p)
integer, pointer :: p(:)
p => x
end function get
subroutine increment(n)
integer, intent(inout) :: n(:)
n = n + 1
end subroutine increment
end module m
use m
call increment( get() )
end
--- end program ---
Thank you,
Vipul Parekh
Disclaimer
The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. Please see our Privacy Notice <https://www.nag.co.uk/content/privacy-notice> for information on how we process personal data and for details of how to stop or limit communications from us.
This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210308/26aa122b/attachment.htm>
More information about the J3
mailing list