Question: readline - output not being cleared

The "program" below includes a readline statement.  This does not clear the former output when run again.  Is there any modification to correct this?

David

 

restart;
 with(plots):
 with(plottools):
 #f:=proc()
 #local c, numplayers:
 #numplayers:=4:
 #c:= rectangle([0,0], [11,11], color=red):
 #plots[display](c, scaling=constrained, view=[-0.8..11.5,-0.8..12],axes=BOXED);
 printf("Enter the number of players:\n");
 numplayers:=readline(terminal):
 printf("Number of players is %s\n",numplayers);
 #printf("Number of players is %d\n",numplayers);
 #return "foo";
 #end proc:
 #f();

Please Wait...