In [18]:
workspace()
module English
greeting()="Hello"
farewell() ="Goodbye!"
export greeting
end
Out[18]:
In [15]:
English.greeting()
Out[15]:
In [16]:
using English
greeting()
Out[16]:
In [17]:
# If something is not exported it will not automatically be available in the global namespace
farewell()
In [22]:
# it’s still possible to import into the global namespace functions which have not been exported
import English.farewell
farewell()
Out[22]:
In [ ]: