For Programmers: Free Programming Magazines  


Home > Archive > Fortran > March 2004 > g77, cygwin, CALL System('cls')









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author g77, cygwin, CALL System('cls')
Lars Steinke

2004-03-27, 12:16 am

Hello,

I am using g77 with cygwin on Windows XP Professional.
I have a problem with:

CALL System('cls')

This has no effect.
If I use g77 with cygwin on Windows 98, it works.
And if I run this (98)-program on XP it works too.


Thanks, Lars
Richard Maine

2004-03-27, 12:16 am

Lars Steinke <lars.steinke@tu-clausthal.de> writes:

> Hello,
>
> I am using g77 with cygwin on Windows XP Professional.
> I have a problem with:
>
> CALL System('cls')
>
> This has no effect.
> If I use g77 with cygwin on Windows 98, it works.
> And if I run this (98)-program on XP it works too.


My guess is that this has nothing to do with Fortran, but is
a purely Windows issue....and while I have some vague ideas,
my Windows expertise is *WAY* less than my Fortran one, so my
guesses don't tend to be as good. For example... how sure
are you that the difference is really a function of just the
operating system and nothing else? All XP Pro systems are
not the same (indeed, it is hard to find any two that are
the same because every time you install an application, it
mucks with the operating system, possibly in important ways).
It particularly occurs to me to wonder about ANSI drivers...
but as I said, my crystal ball gets pretty clouded when it
comes to Windows.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
Charles Russell

2004-03-27, 12:16 am


"Lars Steinke" wrote

> I am using g77 with cygwin on Windows XP Professional.
> I have a problem with:
>
> CALL System('cls')
>


Try the cywin mailing list. They are much happier if you check the cygwin
FAQ and mailing list archives first.


Tim Prince

2004-03-27, 12:17 am


"Charles Russell" <STOPworworSPAM@bellsouth.net> wrote in message
news:x9l6c.21590$zP2.6685@bignews5.bellsouth.net...
>
> "Lars Steinke" wrote
>
>
> Try the cywin mailing list. They are much happier if you check the cygwin
> FAQ and mailing list archives first.
>
>

As 'cls' is not a cygwin or posix command, you may not find much help there.
If you want this to work, figure out where that command resides and add its
path to the PATH in whatever shell you may be using. Are you sure you
didn't do something like that to your previous cygwin installation?


Charles Russell

2004-03-27, 12:17 am


"Tim Prince" <tprince@computer.org> wrote

cygwin[color=darkred]
> As 'cls' is not a cygwin or posix command, you may not find much help

there.

All depends on whether you catch the eye of an interested participant. Two
tips on using the cygwin mailing list: 1) avoid using the word fortran,
especially in the subject line, 2) try to duplicate any g77 problem using C.
With these reservations, support from that group is first-rate.

In this case, the OP got his answer:
http://sources.redhat.com/ml/cygwin...3/msg00888.html



E P Chandler

2004-03-27, 12:17 am

Richard Maine <nospam@see.signature> wrote in message news:<m1smg6hzi8.fsf@macfortran.local>...
> Lars Steinke <lars.steinke@tu-clausthal.de> writes:
>
>
> My guess is that this has nothing to do with Fortran, but is
> a purely Windows issue....and while I have some vague ideas,
> my Windows expertise is *WAY* less than my Fortran one, so my
> guesses don't tend to be as good. For example... how sure
> are you that the difference is really a function of just the
> operating system and nothing else? All XP Pro systems are
> not the same (indeed, it is hard to find any two that are
> the same because every time you install an application, it
> mucks with the operating system, possibly in important ways).
> It particularly occurs to me to wonder about ANSI drivers...
> but as I said, my crystal ball gets pretty clouded when it
> comes to Windows.


There are two ways to look at what CALL System('cls') might do:

1. Load a program named 'cls' and run it.

2. Pass the string 'cls' to the (a) command interpreter.

This legacy on MS-DOS goes back at least to its CP/M forbearer, where
there were two types of commands, a) permanent commands actually built
into the command interpreter and b) transient commands in which a
program is loaded into memory and run.

The bottom line is that sometimes the command interpreter must be
invoked explicitly to execute one of its internal commands, ie
'command/c cls' or 'cmd/c cls', etc. YMMW!

This is one of these low level operating system issues that "bites"
programmers when porting code not just from one OS to another but also
between versions of the same OS family. A red flag should go up in the
prgrammer's mind when he or she sees a system call or does low level
file I/O or deals with the internal representation of data. These are
not Fortran _language_ issues, but the Fortran _programmer_ must be
aware of them as potential pitfalls.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com