Reset Julia REPL

I have a script that uses a global variable. When experimenting I run the script via julia REPL by writing include(“myscript.jl”). This works fine the first time, but the second time I always get the message “WARNING: redefinition of constant my_global_variable. This may fail, cause incorrect answers, or produce other errors.” I can understand this error since the global variable is already in memory and me running include again just reloads a copy of same variable. Is there a command in the REPL allowing me to reset everything before I run include(“myscript.jl”) (except for the obvious solution of closing the REPL)?

You are looking for

2 Likes