(j3.2006) Question about implicit declaration

Malcolm Cohen malcolm
Fri Jul 21 02:13:45 EDT 2017


Sure,

 

module junk

  type t

    real(kind(x)) c

  end type

end

program test

  use junk

  implicit none

  x = 3

  print *,x

end

 

X is implicitly declared within the type definition, which effectively declares it in the module scope.

 

-- 

..............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 8:41 AM
To: j3 <j3 at j3-fortran.org>
Subject: (j3.2006) Question about implicit declaration

 

8.7p4 says that if the outermost inclusive scope in which an entity
appears is not a type definition it is declared in that scope; otherwise
it is declared in the host of that scope.

Is it possible to declare the type of anything in a type definition
implicitly?

If not, what does "if the outermost inclusive scope in which an entity
appears is not a type definition" contribute?


_______________________________________________
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/646c1e6e/attachment.html 



More information about the J3 mailing list