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.. This thread at 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 :1953

Tags: , , ,

  1. No comments yet.

Content Protected Using Blog Protector By: PcDrome.

Mahol Dot Org is Stephen Fry proof thanks to caching by WP Super Cache