| Variables / Examples | |
This example declares public and private module variables. Public variables can be shared with other modules.
PUBLIC DEFINE debug_level VARCHAR(100)
PUBLIC DEFINE debug_logfile VARCHAR(100)
PRIVATE DEFINE message_count INTEGER
FUNCTION debug_msg(m)
  DEFINE m STRING
  IF debug_level THEN
     -- Write message to debug_logfile
     ...
  END IF
END FUNCTION
IMPORT FGL "mydebug.4gl"
MAIN
  LET mylog.debug_level = 4
  CALL debug_msg("Some debug info...")
END MAIN