Built-in Fortran keyword in module instructions

What does it mean when a keyword is intrinsic

added to a statement use

for a module like in the following example?

  use, intrinsic :: iso_c_binding

      

(Since 7.1 Fortran Interface Overview, FFTW 3.3.6-pl1 )

Does it indicate that a module of that name, provided by the compiler, should be used even if there is another module with the same name written by the user?

+3


source to share


1 answer


C has use, intrinsic :: ...

indeed selected its own module.

There is perhaps a slight subtlety in the point worthy of attention. As for "a unit of this compiler-supplied name should be used", this "should" does not mean a preference, but a strong requirement. That is, if there is no such built-in module, then compilation cannot be performed. This shouldn't be a problem with iso_c_binding

, but compilers often offer their own custom built-ins.



There is no way to say "use a built-in module if available, but user supplied if not".

+4


source







All Articles