Skip to content

The access operator

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

Let's say you write a function test:

store 100 in num

function test()
    print(num)
end

Now you call the function but, whoops! There is an error! Right, you can't access the variable num because in jask, every function runs in it's own separated scope.

But there's is a trick to achieve that: The access operator "!":

store 100 in num

function test()
    print(!num)
end

Now it works! The access operator allows you to access all variables outside your function scope.