I saw questions on the forum.
I want to offer a simple way:
main.agc:
SetErrorMode(2)
// set window properties
SetWindowTitle( "testCall" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
do
Print( ScreenFPS() )
//CallSUB("bubu")
//CallSUB("bebe")
//CallSUB("mumu")
CallSUB("meme")
Sync()
loop
function CallSUB(name as string)
token = name
gosub lstart
endfunction
lstart:
global token as string
#insert "Module_A.agc"
#insert "Module_B.agc"
return
Module_A.agk:
select token
case "bubu"
bubu()
endcase
case "bebe"
bebe()
endcase
endselect
function bubu()
print("called bubu function")
endFunction
function bebe()
print("called bebe function")
endFunction
Module_B.agc:
select token
case "mumu"
mumu()
endcase
case "meme"
meme()
endcase
endselect
function mumu()
print("called mumu function")
endFunction
function meme()
print("called meme function")
endFunction
Passing parameters can be done through the global stack or list, but these are trifles.
Perhaps it will be useful.