previous next top contents index framed top this page unframed
Figure 32–14. $checkConsistency
| STRING PROCEDURE $checkConsistency; |
$checkConsistency traverses memory in the same way a garbage collection would, but it performs no collection. If it finds any inconsistencies in MAINSAIL's data structures, it returns a STRING error message. If it finds no inconsistency, it returns the null STRING.
Inconsistencies are frequently introduced when a POINTER is used to modify the field of a disposed object (see Section 33.30), although other things can cause inconsistencies as well.
Not all inadvertent overwriting of memory creates inconsistencies that are detectable by $checkConsistency.
Strategically located calls to $checkConsistency may be used to determine where an inconsistency first appeared. The MAINSAIL utility MM provides a way to invoke $checkConsistency interactively; see Chapter 23 of the MAINSAIL Utilities User's Guide.
MAINSAIL Language Manual, Section 32.17