Skip to content

Instantly share code, notes, and snippets.

@haigopi
Last active February 26, 2019 02:15
Show Gist options
  • Save haigopi/af13b3e5384c3cc2e63c4152be75020d to your computer and use it in GitHub Desktop.
Save haigopi/af13b3e5384c3cc2e63c4152be75020d to your computer and use it in GitHub Desktop.
#=
ModuleCaller:
- Julia version: 1.1.0
- Author: GOPI K KANCHARLA
- Date: 2019-02-25
=#
module Bar
x = 1
foo() = x
end
import .Bar
x = 10;
println(Bar.foo())
for i in 1:10
z = Bar.foo()
end
for i = 1:10
z = i
global z
end
x, y = 0, 1
for i = 1:10
x = i + y + 1
end
println(x)
x = 1;
function foobar()
global x = 2
end;
println(x)
local x::Int8
function plus(x::Int, y::Int)
x + y
end
mutable struct Foo{T}
bar
baz::T
qux::T
end
foo = Foo("Hello, world.", 23, 1.5)
foo.bar = "TEST"
println(foo.bar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment