Skip to content

Modules inside functions!

Julius Paffrath edited this page Dec 8, 2016 · 2 revisions

jask supports besides Inside Function Defines another very cool feature called inside modules. This allows you to import a module inside a function! See the following code:

function myFunction()
    use jcore/jnumber
    print(PI())
end

The imported module jcore lives only inside myFunction and can't be used outside.