Fetch the current pass number that code is being executed in.
returnedString = variableType("$passnum")
returnedString - type: integer
variableType - type: G
Current pass number that the parser is executing in.
With $rulenum, yields the pass and rule number. NOTE that when executing in a function outside a rule context, $passnum indicates the pass that the function was DEFINED IN. (This behavior will be fixed in a future version with the addition of another variable called something like $codepass.)
# Print current pass number and rule number.
"output.txt" << G("$passnum") << ", " << G("$rulenum") << "\n";
_xNIL <- _clause @@
When this rule matches, output.txt contains lines such as
$rulenum, Special Variables