Madhusudan Joshi
Madhusudan Joshi

Reputation: 4476

How do i clear screen in Erlang in Windows

I am using Windows as OS and installed Erlang 16B. How do i clear my screen?

I have already tried :

clrscr().

clearscreen().

cls().

But failed each and every time.

(May be very simple question but i am not able to find the solution.)

Upvotes: 3

Views: 2008

Answers (2)

anuj pradhan
anuj pradhan

Reputation: 2887

Type the below command to your erlang shell. io:format(os:cmd(clear)). And off you go :)

Upvotes: 6

Peter Paul Kiefer
Peter Paul Kiefer

Reputation: 2124

The author of the following link/answer suggests to use io:format.

http://erlang.org/pipermail/erlang-questions/2014-November/081939.html

Write your own function call:

clear() ->
    io:format("\033[2J").

Upvotes: 2

Related Questions