Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] myprog < input.file in photran???

On 8/28/06, Thomas Reichardt <thomas.reichardt@xxxxxxxxxxxxxxx> wrote:
Dear photran users

with a terminal I can execute a program with "myprog < input.file".

How does this work in Eclipse(Photran)?

I have tried it by inserting "< input.file" in run -> (x)arguments,
unfortunately without success.

Regards,
Thomas


Hi Thomas,

Indeed this does not work in Eclipse. Note that the < sign is
interpreted by the command shell and it will open the file for you and
pass it to stdin of your program. The arguments that you set in
Eclipse are just that, arguments which are not processes by a command
shell. So a way around this is to change your program to accept a
filename as argument and open it yourself and default to stdin if no
argument is given in order to keep the orinal functionality as well.

Good luck.
Luud


Back to the top