10

What does it mean when the intrinsic keyword is added to the use statement for a module, as in the following example?

  use, intrinsic :: iso_c_binding

(From 7.1 Overview of Fortran interface, FFTW 3.3.6-pl1)

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

0

1 Answer 1

10

With use, intrinsic :: ... the intrinsic module is indeed chosen.

There is perhaps a slight subtlety in the question worth addressing. With regards to "a module of that name provided with the compiler should be used", this "should" doesn't indicate a preference but a strong requirement. That is, if there's no such intrinsic module then compilation cannot succeed. This shouldn't be a problem with iso_c_binding but compilers often offer their own non-standard intrinsic modules.

There is no way to say "use the intrinsic module if it's available, but the user-provided one if not".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.