MQL body statements

Here are the MQL body statements:

Most commonly used statements
assignment Changes variables value or model element properties.
if, else Conditionally skip some statements.
foreach, break Processes some statements for each element contained within a collection.
method call Calls a method or a script.
return Exits a script or a rule, with an optional value.
rule call Evaluates a rule, either of the same ruleset or of an external ruleset.
text template call Generates a file based on a referenced text template.
var Creates a new variable and initializes its value.
while, break Processes some statements while a condition is true.

Advanced statements
attempt, recover Provides alternate processing in case an error occurs.
stop Aborts the evaluation process.

MQL comments are defined the same way as in Java and C/C++: