View previous topic :: View next topic |
Author |
Message |
MundoRosso
Joined: 05 Apr 2011 Posts: 2
|
Posted: Wed Apr 06, 2011 7:00 pm Post subject: Error message when using Modules - array size? |
|
|
I am using the Express edition of ftn95 and looking to update some old FORTRAN77 code to ftn95.
My old programs, which contain subroutines, used COMMON blocks for common storage areas, but I understand that MODULES are the way to go.
Whilst the code compiles successfully as either COMMON or MODULE, when trying to run the program via debug, I get the error message "Unable to launch application for this file".
The problem seems to lie in the size of arrays I'm declaring in either the COMMON block or MODULE.
In my module I have:
MODULE DATA_MODULE
REAL :: Array1(10), B, Array2(3500)
INTEGER :: Count = 0
INTEGER, PARAMETER :: Order = 10
END MODULE DATA_MODULE
and in the main program, the first lines of code are:
PROGRAM ModTest
USE DATA_MODULE
If I reduce the size of Array2 to, say, 1,000, then the program runs ok.
I can also put very large arrays in the main program and it runs ok.
Assistance on where the problem lies would be much appreciated. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Thu Apr 07, 2011 1:34 am Post subject: |
|
|
The error should not relate to the size of "Array2" as the examples you have given are very small.
The problem probably relates more to errors in your code which effect the creation of the .exe file.
Check your compile errors, as the link may not be taking place.
Can you select to create a .map file when linking ?
Also check the date stamp on the files to ensure thay are being recreated. |
|
Back to top |
|
 |
MundoRosso
Joined: 05 Apr 2011 Posts: 2
|
Posted: Sun Apr 10, 2011 6:47 pm Post subject: |
|
|
Hi John,
Thanks for your prompt response and help on this.
Solved the problem by switching from .NET to Win32 compiler.
Now I can use arrays of the size I need. |
|
Back to top |
|
 |
|