Variables / Examples |
This example declares public and private module variables. Public variables can be shared with other modules.
PUBLIC DEFINE level INTEGER, logfile STRING PRIVATE DEFINE count INTEGER FUNCTION message(m) DEFINE m STRING IF level THEN -- Write message to debug_logfile DISPLAY m END IF LET count = count + 1 END FUNCTION
IMPORT FGL mydebug MAIN LET mydebug.level = 4 LET mydebug.logfile = "myfile.log" CALL mydebug.message("Some debug info...") END MAIN