(j3.2006) Question about statement functions and host association

Malcolm Cohen malcolm
Fri Jul 21 02:29:50 EDT 2017


I agree that on the face of it, C1576 forbids use of a host-associated statement function within a statement function definition.  This wording is identical to that of F95.

 

A quick test of 4 compilers found none which complained about this constraint violation.  Probably no-one noticed.  (I do recall the statement function constraints were so badly written in Fortran 90 that I decided to ignore all of them and just do whatever I thought was best!).

 

OTOH I am not sure it is worth making into an official new feature? which we?d need to do if we cared about it.  (It is certainly plausible that some compiler somewhere actually enforces this.)

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

From: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-fortran.org] On Behalf Of Van Snyder
Sent: Tuesday, July 18, 2017 10:36 AM
To: j3 <j3 at j3-fortran.org>
Subject: (j3.2006) Question about statement functions and host association

 

19.5.1.4 says a nested scoping unit has access to named entities from
its host.

C1576 says that if a reference to a statement function appears in the
<scalar-expr> of the definition of a statement function, "its definition
shall have been provided earlier in the scoping unit."

I couldn't find a place where "shall have been provided earlier in the
scoping unit" is specified to include host association.

Can a reference to a statement function within the <scalar-expr> of the
definition of a statement function be a reference to one accessed by
host association?


_______________________________________________
J3 mailing list
J3 at mailman.j3-fortran.org <mailto:J3 at mailman.j3-fortran.org> 
http://mailman.j3-fortran.org/mailman/listinfo/j3



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.

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: http://mailman.j3-fortran.org/pipermail/j3/attachments/20170721/67170d0e/attachment-0001.html 



More information about the J3 mailing list