Google Groups Home Help | Sign in
Message from discussion Standard input
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Tim Springer  
View profile
 More options May 2, 7:33 am
Newsgroups: comp.lang.fortran
From: "Tim Springer" <Tim-Springer-nos...@t-online.de>
Date: Fri, 2 May 2008 13:33:36 +0200
Local: Fri, May 2 2008 7:33 am
Subject: Standard input
Dear Group,

The program package I am using executes programs in the following way (under Unix):
 program.bin < program.input

So the file "program.input" is piped in to the program "program.bin" and thus to my understanding the "program.input" is connected
to the standard input of the fortran program.

Now I would like to be able for a new programme to have some manual interaction with the program. So read something from standard
input (i.e. command line) and let the program do something based on that input. However, since the file "program.input" is now the
standard input I do not seem to be able to input anything from the command line. I tried closing and reopening unit 5 but that
does not work.

Any hints and tips how to solve this using Fortran90 or 95.

Of course the easiest for this program is to run it without piping anything into the programme. However, that would affect all the
other programs I have (although the change would just be in 1 library, so it is not impossible). However, if there is an easier
way around this I would be very interested!

Many thanks in advance!

Cheers,
Tim Springer


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google