Next: How to read the method descriptions, Previous: Naming conventions, Up: Introduction to the method descriptions [Contents][Index]
Some general conventions for return values are worth mentioning:
NULL
usually indicates method failure.
Any other result usually indicates method success.
The words “success” and “failure” are heavily overloaded in these documents. But in contexts where our meaning is clear we will usually abbreviate “method success” and “method failure” to “success” and “failure”, respectively.
The Libmarpa programmer should not overly rely on the general
conventions for return values.
In particular, -2 may sometimes be ambiguous —
both a valid return value
for method success, and a potential indication of hard method failure.
In this case, the programmer must distinguish the two return statuses
based on the error code,
and a programmer who is relying too heavily on the general
conventions will fall into a trap.
For a the description of the return values of
marpa_g_rule_rank_set()
,
see Rank methods.