Re: Clear Screen
- From: Steve Lionel <steve.lionel@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 21:08:01 -0700
On Jul 30, 8:48 pm, Rosana Khan <khanros...@xxxxxxxxx> wrote:
I am having some trouble with clearing screen. I can't find any way to
do this in Fortran.
Documents fromhttp://www.ibiblio.orgsay that
WRITE(*,*) CHAR(27), '[2J'
statement will clear the screen. But it is not working for me. I used
CALL SYSTEM('cls') or CALL system('clear'); but I dont like the idea.
Is there any other way in Fortran to do that?
That code assumes ANSI control sequence support. You don't say what
OS (or compiler) you are using, but for Windows, Microsoft dropped
support for ANSI control in Windows NT and later 32-bit versions of
Windows (2000, XP, Vista). If the system calls you are using do what
you want, that's probably the easiest solution.
Another thing - How can I access printer from a Fortran program?
Here again it would be helpful to know the OS and compiler. Gone are
the days where one could just write to LPT: and print something.
Today's bitmapped printers require some sophisticated code to render
the output.
Intel Visual Fortran for Windows provides a sample application that
demonstrates how to do this - it includes a callable routine that will
use the Windows print mechanism to print the contents of a text file,
with lots of control over spacing, page length, font and more.
Steve
.
- Follow-Ups:
- Re: Clear Screen
- From: Rosana Khan
- Re: Clear Screen
- References:
- Clear Screen
- From: Rosana Khan
- Clear Screen
- Prev by Date: Re: Clear Screen
- Next by Date: Re: forall and do loop
- Previous by thread: Re: Clear Screen
- Next by thread: Re: Clear Screen
- Index(es):
Relevant Pages
|
|