Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Global variables within 2 files

$
0
0

Hello!

How can I declare a global variable that is shared between two files?

File1.jl

import("File2. jl)

function1 test()
close=false
a=0
If a>0
close = true
end
end

File2.jl

function2 test2()
If close == true
b=0
end
end

The shared variable is close=true or false

Thank you!

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles