?
Solved

CLS command?

Posted on 2003-02-23
2
Medium Priority
?
4,285 Views
Last Modified: 2013-12-03
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
Comment
Question by:mrflibble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
fridom earned 300 total points
ID: 8017225
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
 
LVL 1

Expert Comment

by:bearware
ID: 9831994
class ...
inherit SYSTEM

...

feature

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

end --class ...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question