- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a question:
How to do redirecting input/output in project/properties in VISUAL Studio.NET IDE ?
In console ( command line ) is
ifort -o file file.f
file output.out
But I do nott know to do this in IDE. Where I have to put input.in and output.out files in VISUAL Sutdio.NET ?
Thanks.
How to do redirecting input/output in project/properties in VISUAL Studio.NET IDE ?
In console ( command line ) is
ifort -o file file.f
file
But I do nott know to do this in IDE. Where I have to put input.in and output.out files in VISUAL Sutdio.NET ?
Thanks.
Message Edited by ronaiml on 11-09-2005 05:59 PM
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The output from the command lines are redirected to the target folder using the file name BuildLog.txt or to BuildLog.htm depending on the version of your compiler. e.g.
C:ProjectNameReleaseBuildLog.txt (or BuildLog.htm)
or to
C:ProjectNameDebugBuildLog.txt (or BuildLog.htm)
The input comes from the IDE
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think what is being asked is how to redirect input and output from the executable. You do this on the Debug property page with standard redirection operators, but I have found that you have to give an explicit path for the files and not rely on defaults - I don't know why that is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I use IDE and " start without debugging " the prompt call file name. When I enter filename: file.in the program dont work in IDE. So I have to use command line.
filename.exe $<;file.in;>$ file.out
My code:
...
character*60 file1,nucl,fname1,fname2
common /priuni/ l6, llg
c----------------------------------------------------------------------
l5=15
l6=10
llg=2
ldt=3
write(6,*) ' Input data ************'
read(5,'(a60)') nucl
write(6,'(a60)') nucl
do i=60,2,-1
if(nucl(i:i).eq.' ') then
in=i
endif
end do
fname1=nucl(1:in-1)//'.in'
fname2=nucl(1:in-1)//'.fdt'
open(unit=l6,file=nucl(1:in-1)//'.cal',status='unknown')
open(unit=llg,file=nucl(1:in-1)//'.log',status='unknown')
read(5,*) isrch
write(6,*) isrch
read(5,*) p0
write(6,*) ' p0 ',p0
read(5,*) ip
write(6,*) ' ip ',ip
read(5,*) indat
write(6,*) ' indat ', indat
filename.exe $<;file.in;>$ file.out
My code:
...
character*60 file1,nucl,fname1,fname2
common /priuni/ l6, llg
c----------------------------------------------------------------------
l5=15
l6=10
llg=2
ldt=3
write(6,*) ' Input data ************'
read(5,'(a60)') nucl
write(6,'(a60)') nucl
do i=60,2,-1
if(nucl(i:i).eq.' ') then
in=i
endif
end do
fname1=nucl(1:in-1)//'.in'
fname2=nucl(1:in-1)//'.fdt'
open(unit=l6,file=nucl(1:in-1)//'.cal',status='unknown')
open(unit=llg,file=nucl(1:in-1)//'.log',status='unknown')
read(5,*) isrch
write(6,*) isrch
read(5,*) p0
write(6,*) ' p0 ',p0
read(5,*) ip
write(6,*) ' ip ',ip
read(5,*) indat
write(6,*) ' indat ', indat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I mentioned above, you have to give the full path to the file in the command line in the debug property page. Why, I don't know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a simple console application and during debugging I would like to read the terminal (unit=5) input parameters from a file. According to the previous posts, it would be sufficient to put "< InpFile" into the "Command Arguments" box of the Propert/Debugging page. It does not work; i.e. keep asking parameters on the console. Putting the full pathin front ofthe file name does not help.
Interestingly passing "real" command arguments by putting into the "Command Arguments" box of the Propert/Debugging page does work.
Any idea?
Tibor
Interestingly passing "real" command arguments by putting into the "Command Arguments" box of the Propert/Debugging page does work.
Any idea?
Tibor

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page