--------------------------------------------------- 
-- FBA Tutorials
--
-- Tutorial / 19a / Modules
--
--------------------------------------------------- 
--
-- You can declare a script as a "module" (see mymodule.fba)
-- When you do this, all functions or variables inside that script will be accessible
-- using "modulename.functionname"
--
-- In many other languages, this is commonly known as "namespace"
--
-- For many programming languages, a namespace is a context for identifiers.
--
--------------------------------------------------- 

-- include the modules files from resources
include("mymodule")
include("mymodule2")

-- tell the interpreter we need that packages
require("my_module_name")
require("my_other_module")


function myfunction()
        print(20,20,"THIS FUNCTION IS INSIDE MAIN SCRIPT",0,0,255)
end

function onmainloop()
        
        myfunction()
        
        my_module_name.myfunction()
        
        my_other_module.myfunction()
        
end

function onstylusdown(x,y)
        quit()
end
