Mahol Dot Org

Icon

Weblog For All Your Need

This USE Statement Is Not Positioned Correctly Within The Scoping Unit

Error: This USE statement is not positioned correctly within the scoping unit.
I keep getting this error, and I have no idea why. The program is in a very standard structure:
I did check help / man page of IFORT but no luck..
http://www.intel.com/sites/sitewide/HAT/40recode/pix/main-logo.png This thread at intel.com also discuss about the same problem.
the answer at this thread is

“USE YourModule” must preceed local variable declarations. Your include file (at least one of your include files) is declaring at least one variable.

Place your USE to preceed the include statements.

But that did not work completely,

and other 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 also must precede any IMPLICIT statements. Best is to have them come directly after the SUBROUTINE or FUNCTION statement.

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

Number of View :306

Related posts:

  1. Unresolved External Symbol _getenv_ USE IFPORT Link Error For Application Porting From UNIX To Win32
  2. Ifort -extend-source Option Errors & Fortran Fixed Formatting Use nofree
Receive Updates By Email

Enter your email address:

Delivered by FeedBurner

Category: Unix2Win32_Porting

Tagged: , , ,

Leave a Reply

Lost !! Use Advanced Search

Categories

Content Protected Using Blog Protector By: PcDrome.

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