CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

clear screen in Fortran

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 3, 2006, 13:19
Default clear screen in Fortran
Posts: n/a
Hi Guys,

I am wondering if there is specific command in fortran to clear screen afer using "write" command. I know that in Pascal there is such a command called "clrscr". If somebody knows how it could be done in fortran, I appreciate to let me know.


  Reply With Quote

Old   October 3, 2006, 17:12
Default Re: clear screen in Fortran
Posts: n/a
Not in standard Fortran to my knowledge, although your compiler may support it as a compiler specific command. I guess Fortran shows its age in the lack of such support - back in the day we didn't have screens just printers.
  Reply With Quote

Old   October 4, 2006, 03:40
Default Re: clear screen in Fortran
Posts: n/a
The answer is that it depends on what clear screen means, what compiler you are using and what support it is getting from your operating system. You may be able to pass the required instruction as the first character in your record but most would advise against doing this even if you can. Further discussion here:

  Reply With Quote

Old   October 4, 2006, 07:20
Default Re: clear screen in Fortran
Posts: n/a
Is this in linux? If so:

the "call system" command can load a dummy shell and issue commands, dummy as in it issues the commands in the same shell the program is running, anyway...

call system('clear')

It is important to place this in quotes, as the command you type must be the command you would time in a command prompt. Plus it has no access to you alias commands so if you normally type ll, but actually have an alias to produce ls -l, then you would need

call system('ls -l')

on some systems you many also need

call system('/usr/bin/ls -l')

be careful with this though, especially if you're using rm!!
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran Compiler-CFX12.1 Araz CFX 13 March 27, 2017 05:37
Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77 hawk Main CFD Forum 1 April 12, 2005 22:13
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45
Why Favoring Fortran over C/C++? Zi-Wei Chiou Main CFD Forum 35 September 26, 2001 09:34
smoke & screen Marko Main CFD Forum 12 May 15, 2000 11:56

All times are GMT -4. The time now is 23:53.