Start from a main routine: Difference between revisions

m
m (→‎{{header|Quackery}}: too many whens!)
Line 240:
The initialization/1 can also be used within entities (objects and categories) to automatically run entity-specific initializations when the container source file is compiled and loaded. In alternative, it's usually possible to pass a goal as a command-line argument when running the application executable (the details depending on the backend Prolog compiler being used).
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
Mathematica automatically starts a REPL (read-eval-print loop), which is a kind of event loop. If that is not desired, pass -run on the command line. Note that if Mathematica is called via MathLink from within an external program, then the main loop has to be defined, which will usually differ from the standard one.
 
1,111

edits