Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

Redirecting input/output in IDE ( in VISUAL Studio.NET )

ronaiml
Beginner
1,524 Views
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.

Message Edited by ronaiml on 11-09-2005 05:59 PM

0 Kudos
5 Replies
jim_dempsey
Beginner
1,524 Views

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
0 Kudos
Steven_L_Intel1
Employee
1,524 Views
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.
0 Kudos
ronaiml
Beginner
1,524 Views
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
0 Kudos
Steven_L_Intel1
Employee
1,523 Views
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.
0 Kudos
tkibedi
Novice
1,523 Views
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
0 Kudos
Reply