* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
@ 2004-03-21 20:22 Lars Steinke
0 siblings, 0 replies; 9+ messages in thread
From: Lars Steinke @ 2004-03-21 20:22 UTC (permalink / raw)
To: gcc-help
Hi,
the answer to my problem:
http://sources.redhat.com/ml/cygwin/2004-03/msg00887.html
Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
@ 2004-03-19 16:53 Lars Steinke
0 siblings, 0 replies; 9+ messages in thread
From: Lars Steinke @ 2004-03-19 16:53 UTC (permalink / raw)
To: gcc-help
Hi,
first of all: thanks a lot for your answers!
I have revised my PATH and now it is possible to do the following:
write(*,*)'1'
pause
call system('clear')
write(*,*)'2'
pause
end
It works (Win-XP-shell)!
..but
if I use:
call system('cls')
I get the following (new) message:
cls: not found
If I write the cls-command manually in the Win-XP-shell, it works.
If my program tries to invoke the cls command in the Win-XP-shell it does not work?
Thanks, Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
2004-03-18 18:22 ` Eljay Love-Jensen
@ 2004-03-19 2:06 ` Toon Moene
0 siblings, 0 replies; 9+ messages in thread
From: Toon Moene @ 2004-03-19 2:06 UTC (permalink / raw)
To: Eljay Love-Jensen; +Cc: Lars Steinke, gcc-help
Eljay Love-Jensen wrote:
> Hi Lars,
>
> >How can I test if the routine CALL System works correct?
>
> I do not know. I am not familiar with FORTRAN or the vagaries of its
> CALL System. I suspect that CALL System is very platform dependent.
>
> >Is it possible that the routine does not send the 'command' to the
> active win-XP-shell?
>
> I would expect that the CALL System command should launch a brand new
> shell, not interact with the active win-XP-shell.
>
> But I'm beyond my knowledge, so it's utter speculative guesswork.
The following works on Linux (actually, Debian test):
$ cat steinke.f
CALL SYSTEM('clear')
END
$ g77 steinke.f
$ ./a.out
<clears screen>
So it basically works. Now why it doesn't work on Windows is beyond me,
but I have to work daily with people who use Windows and most of what is
happening to them is incomprensible (both by them and by me).
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
2004-03-18 18:12 Lars Steinke
@ 2004-03-18 18:22 ` Eljay Love-Jensen
2004-03-19 2:06 ` Toon Moene
0 siblings, 1 reply; 9+ messages in thread
From: Eljay Love-Jensen @ 2004-03-18 18:22 UTC (permalink / raw)
To: Lars Steinke, gcc-help
Hi Lars,
>How can I test if the routine CALL System works correct?
I do not know. I am not familiar with FORTRAN or the vagaries of its CALL
System. I suspect that CALL System is very platform dependent.
>Is it possible that the routine does not send the 'command' to the active
win-XP-shell?
I would expect that the CALL System command should launch a brand new
shell, not interact with the active win-XP-shell.
But I'm beyond my knowledge, so it's utter speculative guesswork.
Sorry,
--Eljay
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
@ 2004-03-18 18:12 Lars Steinke
2004-03-18 18:22 ` Eljay Love-Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Lars Steinke @ 2004-03-18 18:12 UTC (permalink / raw)
To: eljay, gcc-help
Hi,
if I compile
CALL System('cls')
on Win98. It works on 98 and the same program works on XP too (win-XP-shell).
If I try to run the ("XP"-)program in the cygwin-shell (XP-OS):
bash: a.exe: command not found
?
How can I test if the routine CALL System works correct?
Is it possible that the routine does not send the 'command' to the active win-XP-shell?
Lars
-----------------
>Hi Lars,
>
> > I guess the routine CALL System does not work?
>
>Hmmm, maybe.
>
>There is no "cls" application, nor "dir" application. Both of those are
>cooked into the CMD.EXE shell.
>
> >BTW: clear is a unix-command. Can it work in a dos-shell with cygwin?
>
>I presumed your shell was the CygWin bash shell, since you mentioned
>CygWin. Since clear (or more appropriately, clear.exe in CygWin) is an
>application, I was hoping it'd work in this situation. But alas.
>
>I am surprised that the X3.64 "ESC [ 2 J" sequence didn't work. The
>console you must be working with must not be "ANSI.SYS" savvy. Alas and alack!
>
>Hmmm, I'm not a FORTRAN guy, so I don't have any more tricks up my sleeve
>that'd be appropriate. (Unless there's an NCurses analog for FORTRAN...)
>
>Sorry,
>--Eljay
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
2004-03-18 16:48 Lars Steinke
@ 2004-03-18 17:01 ` Eljay Love-Jensen
0 siblings, 0 replies; 9+ messages in thread
From: Eljay Love-Jensen @ 2004-03-18 17:01 UTC (permalink / raw)
To: Lars Steinke, gcc-help
Hi Lars,
> I guess the routine CALL System does not work?
Hmmm, maybe.
There is no "cls" application, nor "dir" application. Both of those are
cooked into the CMD.EXE shell.
>BTW: clear is a unix-command. Can it work in a dos-shell with cygwin?
I presumed your shell was the CygWin bash shell, since you mentioned
CygWin. Since clear (or more appropriately, clear.exe in CygWin) is an
application, I was hoping it'd work in this situation. But alas.
I am surprised that the X3.64 "ESC [ 2 J" sequence didn't work. The
console you must be working with must not be "ANSI.SYS" savvy. Alas and alack!
Hmmm, I'm not a FORTRAN guy, so I don't have any more tricks up my sleeve
that'd be appropriate. (Unless there's an NCurses analog for FORTRAN...)
Sorry,
--Eljay
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
@ 2004-03-18 16:48 Lars Steinke
2004-03-18 17:01 ` Eljay Love-Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Lars Steinke @ 2004-03-18 16:48 UTC (permalink / raw)
To: gcc-help
Hi Eljay,
thanks!
'clear' and 'ESC [ 2 J' do not work.
I have tried 'dir'. It does not work too.
I guess the routine CALL System does not work?
BTW: clear is a unix-command. Can it work in a dos-shell with cygwin?
Lars
-----------------
>Hi Lars,
>
>Try:
>
>CALL System('clear')
>
>Or you could just send the X3.64 escape sequence: ESC [ 2 J
>
>HTH,
>--Eljay
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: g77, cygwin, Win XP Pro, CALL System(Command, Status)
2004-03-18 15:28 Lars Steinke
@ 2004-03-18 16:12 ` Eljay Love-Jensen
0 siblings, 0 replies; 9+ messages in thread
From: Eljay Love-Jensen @ 2004-03-18 16:12 UTC (permalink / raw)
To: Lars Steinke, gcc-help
Hi Lars,
Try:
CALL System('clear')
Or you could just send the X3.64 escape sequence: ESC [ 2 J
HTH,
--Eljay
^ permalink raw reply [flat|nested] 9+ messages in thread
* g77, cygwin, Win XP Pro, CALL System(Command, Status)
@ 2004-03-18 15:28 Lars Steinke
2004-03-18 16:12 ` Eljay Love-Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Lars Steinke @ 2004-03-18 15:28 UTC (permalink / raw)
To: gcc-help
Hello,
I am using g77 (cygwin, Win XP Pro) and I would like to pass a command (e.g. 'cls') to the dos-shell.
CALL System('cls')
do not work.
I I use
CALL System('cls', k)
the returned value of k is
127
Can you help me?
Thanks, Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-03-20 18:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-21 20:22 g77, cygwin, Win XP Pro, CALL System(Command, Status) Lars Steinke
-- strict thread matches above, loose matches on Subject: below --
2004-03-19 16:53 Lars Steinke
2004-03-18 18:12 Lars Steinke
2004-03-18 18:22 ` Eljay Love-Jensen
2004-03-19 2:06 ` Toon Moene
2004-03-18 16:48 Lars Steinke
2004-03-18 17:01 ` Eljay Love-Jensen
2004-03-18 15:28 Lars Steinke
2004-03-18 16:12 ` Eljay Love-Jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).