Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

runtime error when using system() function

$
0
0

Hi

I have a working program, written in fortran, using Visual Studio 2010 and Intel Visual Fortran 2011.13.371.  A simple console application.

I'm trying to execute a system call from within my fortran program.  I added a subroutine to my program, with this code:

SUBROUTINE MINE

USE IFPORT

INTEGER I4STAT

CHARACTER*100 DOT

DOT = "DIR"

I4STAT = SYSTEM(DOT)

RETURN

END

I call subroutine MINE from my main program, it bombs every time.

I've built it in debug and release mode, linking with every choice for "Runtime Library" that is available.  Every time, I get an unhandled exception error: Access violation reading location xxxxxx when the call to SYSTEM is executed.  ???

 

Help Please


Viewing all articles
Browse latest Browse all 3270

Trending Articles