clear screen in Fortran
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. Thanks |
Re: clear screen in Fortran
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.
|
Re: clear screen in Fortran
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:
http://www.ibiblio.org/pub/languages...an/ch2-14.html |
Re: clear screen in Fortran
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!! |
All times are GMT -4. The time now is 18:17. |