- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I'm working in IVF 11.1.065 under Windows XP.
My code structure is shown below;
program mainimplicit none
integer ...
real...
open(100,file='input.dat',action='read',status='old')
read(11,*) problem_name
read(11,*)
read(11,*) Var1..
call ...
..
end program main
And the 'input.dat' is;
PROBLEM_NAME
VAR1
VAR1_VALUE
VAR2
VAL2_VALUE...
When I try to debug with other breakpoint, it always breaks at read(11,*) problem_name
If I do something wrong, please let me know.
1 Lösung
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Ah yes, if you are debugging from Visual Studio look at the project properties :
Configuration properties -> Debugging -> Working directory
that needs to point to where your data file resides.
By default (i.e. if blank) it is the directory where your project file is found.
Les
Link kopiert
5 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Assuming you wish to read the contents of the file
change read(11
to read(100
Les
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Les Neilson wrote:Sorry, it's my typo. All are set to same value as read(11,file=...) read(11,*)Assuming you wish to read the contents of the file
change read(11
to read(100Les
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The input file needs to be in the same directory as the exe you are running.
Les
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
What Les says is true if you are running from the command line, but if you are running from Visual Studio, the default file location is the project location, not the subfolder where the EXE is.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Ah yes, if you are debugging from Visual Studio look at the project properties :
Configuration properties -> Debugging -> Working directory
that needs to point to where your data file resides.
By default (i.e. if blank) it is the directory where your project file is found.
Les
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite