replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Error message when using Modules - array size?
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error message when using Modules - array size?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
MundoRosso



Joined: 05 Apr 2011
Posts: 2

PostPosted: Wed Apr 06, 2011 7:00 pm    Post subject: Error message when using Modules - array size? Reply with quote

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
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Thu Apr 07, 2011 1:34 am    Post subject: Reply with quote

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
View user's profile Send private message
MundoRosso



Joined: 05 Apr 2011
Posts: 2

PostPosted: Sun Apr 10, 2011 6:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group