- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry if this question is simple but I don't know where to find the answer.
I have put my input data in a file called ERAUL_4.DAT
I have following command in my code to read the data from it:
DATA IRE /5/
OPEN (5, FILE = 'ERAUL_4.DAT')
OPEN (7, FILE = 'outdata4.txt')
OPEN (8, FILE = 'VERPARAMET.TXT')
WRITE(7,*) '1'
READ(IRE,11) JP(1),JP(2),JP(3),JP(5)
WRITE(7,211) JP(1),JP(2),JP(3),JP(5)
WRITE(8,11) JP(1),JP(2),JP(3),JP(5)
11 FORMAT(4I5)
211 FORMAT(4(I5,', '))
This is a fixed format code.
My project name is called: ConsoleApplication3
I put my input file in the same folder as my project foler (ConsoleApplication3)
Programs runs with no warning.
It seams that it doesn't read the input data becasue I can't get output file.
Am I missing somethiing here?
What is wrong with it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mecej4 wrote:Searching the output file didn't find it.Search for the output files by name using Windows Search. If the program ran without any error messages, it must have found the input file. You may have more than one copy of the input file.
Input and output files are, by default, located in the current working directory. When you use an IDE such as Visual Studio, the concept of current working directory becomes a little nebulous.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bmchenry wrote:Dear bmchenry Thanks for your comment. I am aware of putting messages for print so that I can trace them and already did it. You talked about working directories. How can I access its settings to change to a known place for me?be sure to add error and endof file routings to your code for the OPEN, READ & Write statements and then write a message so you can see if the file is found and opened.
In Visual Studio access Project->Properties->Debugging
see Working Directory to set to something other than the default
Otherwise it will run in either Debug or Release Folders which are sub-directories from your Project location.
Help->Intel Visual Fortran...
will direct you to the User and Reference Manual which also points to samples which should get you up to speed!look at the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bmchenry wrote:Dear Henry What you mentioned in the help menu, exists but it connects to online help. An icon appears in system taskbar referring to http://127.0.0.1:47873/help/0-1540/ms.help?product=VS&productVersion=100&method=f1&query=intel.for.main_cover_xe13&locale=en-US A screenshot is attached. I couldn't get the information I nee regarding READ/Write format from that help.with Visual Studio open (and Fortran installed) when you select help menu you should see
Intel Visual Fortran Composer XE 2013 (or which version you are using)
select that menu option and it should present you with the Help viewer OR simply open the Fortran help file
below is some screen captures on it
also you can use
Read(*,*)
i believe on a console application to read/pause the program
set up a variable to read and then write it to the console to pause and continue
integer something1, something2
read(*,*) something1
write(*,*) something1
read(*,*) something2
etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:Dear Steve thanks for help and support. There are few files with different extensions like as follows in the project folder: ConsoleApplication3.sln ConsoleApplication3.suo Program.for ConsoleApplication3.fsproj ConsoleApplication3.exe ConsoleApplication3.pdb ConsoleApplication3.XML Which one is the empty file? I suppose debuging will make the exe file, if ther is no error. Am I correct? The execution of exe file will run the code and should read the input file. I have the input put inside the project folder. Then it should produce the output file presumably inside the project folder with the name I have opened but I can't find it. One more question. Is it necessary to compile the code after debugging or debugging will compile the code as well? And in order to run the code is it necessary to double click the exe file inside project folder or VS will run and show the result in OUTPUT tab?If you run a program from within Visual Studio, the default directory is the one containing the project file - it is not "nebulous". Typically this is not the directory containing the EXE.
With the code as shown, if the file does not exist in the default directory an empty file will be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:Isn't there any way/procedure to check and be sure that the program is executed or not?None of the files you show would be the empty file as written by the program. Perhaps the program did not run at all. Either the file would have the name given to it in the program, or it would be something like fort.7 for a file written on unit 7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page