Preconditions and postconditions are part of routine definitions. They are optional. If present, they are automatically checked at runtime and an error is reported if a condition is not met. Preconditions are written at the end of a routine body and are checked on exit of the routine. It is the responsibility of the routine to ensure that the postcondition is true, and the caller can assume that the condition is met on return from the routine.
Class invariants are conditions that have to be met by any stable state of an object.
Stable states exist before and after every execution of an interface routine from the outside of an object. Invariants are checked at runtime before and after every external interface call and after execution of the creation routine. A runtime error is generated if an invariant evaluates to false. Comments always extend to the end of the line. They may appear anywhere and are ignored by the compiler.