This USE Statement Is Not Positioned Correctly Within The Scoping Unit

Error: This USE statement is not positioned correctly within the scoping unit.

check help / man page of IFORT but no luck..
https://i0.wp.com/www.intel.com/sites/sitewide/HAT/40recode/pix/main-logo.png This thread at intel.com also here.
the answer at this thread is

“USE YourModule” must preceed local variable declarations and  Your include file is declaring at least one variable.

put your code of  USE to preceed the include statements.

But that did not work completely,

and another half part of answer is
Add an only clause to select only the GETENV routine:
use IFPORT, only: GETENV
This will hide any other names in IFPORT;
This post will talk about why added USE IFPORT
This worked fine..
share your experience as well..

USE should be preceded any IMPLICIT statements. They should be after the SUBROUTINE or FUNCTION statement.

We can have USE and IMPORT statements in the same interface body, but the ‘mixing’  forbidden referring to was that of placing any IMPORT statement before USE statement ..

Number of View :11928

Tags: , , ,

  1. #1 written by Gus March 6th, 2019 at 11:17

    Its recognition comes from its substantial commission rates and its particular thrilling perform.

    RE Q
  2. #2 written by admin August 16th, 2021 at 22:15

    Can you plese suggest correction.

    RE Q

SetPageWidth
Content Protected Using Blog Protector By: PcDrome.