See Frequently Asked Questions · The Julia Language. Something like the following should work:
function main()
# do stuff
end
if abspath(PROGRAM_FILE) == @__FILE__
main()
end
See Frequently Asked Questions · The Julia Language. Something like the following should work:
function main()
# do stuff
end
if abspath(PROGRAM_FILE) == @__FILE__
main()
end