Julia: How to clean the console

I am using Julia Studio and would like to know a command to clear the text and memory console, such as imports or variables? Something like the matlabs "clc" and "clear" commands.

+6
source share
2 answers

Julia 0.3 has a workspace() command to make the equivalent of clear . Use Ctrl-l to clear the screen.

(note: Julia Studio is not supported )

+7
source

As mentioned, the workspace () provides a new Main. You can clear the variables (and the screen) as follows:

 function clear() Base.run(`clear`) for var in names(Main) try eval(parse("$var=0")) catch e end end gc() end 

Definition variables are constant, but can be nullified. For free types, etc. Wrap them in modules. For more information, see the first two questions here: http://docs.julialang.org/en/release-0.4/manual/faq/#how-do-i-delete-an-object-in-memory

+2
source

Source: https://habr.com/ru/post/977178/


All Articles