Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4293
  • Last Modified:

CLS command?

Hi,

I am writing some code that will be used on a linux machine on the command line.  I was wondering if there is a way to clear the screen (just like using the 'clear' command at the bash prompt) without using the curses library etc?

Thanks,

Matt
0
mrflibble
Asked:
mrflibble
1 Solution
 
fridomCommented:
Depends on your implementation, I would not count that you'll find something for that in any of the Eiffels. As C Eiffel has not clue about screen or the like. The only portable solution for clearing is writing as much newlines as you need to standard output.

Unpleasant but ...

Another thing you can try (too implementaton dependant) run a  shell command you do that e.g in SmallEiffel with
execute_command from system.e

Regards
Friedrich


Regards
Friedrich
0
 
bearwareCommented:
class ...
inherit SYSTEM

...

feature

  clear_screen is
  do
    execute_command_line("/bin/clear")
  end --clear_screen

end --class ...
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now