4

I ran

using myModule

but, because myModule had runtime errors, I'd like to undo that using statement. Is there a way to do that at the Julia command line?

I know I could simply close and relaunch the Julia REPL, but I'd like to avoid that because it's relatively slow to start (at least, on Windows).

jub0bs
  • 60,866
  • 25
  • 183
  • 186
Peeter Joot
  • 7,848
  • 7
  • 48
  • 82
  • 2
    possible duplicate? http://stackoverflow.com/questions/25028873/how-do-i-reload-a-module-in-an-active-julia-session-after-an-edit – cel Jan 09 '15 at 15:03
  • 2
    `workspace()` (see the link provided by @cel above). Make sure you're running the latest stable version of `0.3` (or `0.4`) as earlier versions of `0.3`, e.g. `0.3.0` are a bit buggy with the `workspace()` function. – Colin T Bowers Jan 10 '15 at 04:10

1 Answers1

1

As cited in previous answerd question, and refer to Julia documentation:

workspace()

Replace the top-level module (Main) with a new one, providing a clean workspace. The previous Main module is made available as LastMain. A previously-loaded package can be accessed using a statement such as using LastMain.Package.

This function should only be used interactively.

the right answer is to use workspace() function.

Community
  • 1
  • 1
Reza Afzalan
  • 5,646
  • 3
  • 26
  • 44