4

I am using ocaml toplevel with ledit (ledit -l 100 ocaml) on Ubuntu 14.04. Since there is no way to do clear screen, all the time, I keep dwelling at the bottom of the screen.

I would like to know if there is a way to do clear screen at toplevel?

Thanks in advance.

Regards.

jrouquie
  • 4,315
  • 4
  • 27
  • 43
UnSat
  • 1,347
  • 2
  • 14
  • 28

3 Answers3

7

Sys.command "clear" is quite functional - it clears and returns an int :-)

My favourite is Ctrl+l - unixoides only.

Str.
  • 1,389
  • 9
  • 14
6

You could try:

# Sys.command "clear";;

However, it is normal to dwell at the bottom of the screen. The command line has worked this way for at least 30 years :-)

Jeffrey Scofield
  • 65,646
  • 2
  • 72
  • 108
1

You can try: let clear = function x -> Sys.command("clear")+x;;

Then everytime you call: clear x;; where x is an int your screen should be clean again.

AName
  • 11
  • 1