CANCEL operator
The CANCEL operator creates an action that cancels changes in the current session.
Syntax
CANCEL [NESTED [nestedPropertySelector] [CLASSES]]
where nestedPropertySelector has one of the following forms:
LOCAL
(propertyId1, ..., propertyIdN)
Description
The CANCEL operator creates an action that cancels changes in the current session. By specifying the keyword NESTED you can specify local properties whose changes are not dropped when cancelling the changes.
Parameters
-
NESTEDOptional keyword after which you can specify which local properties preserve their changes after the
CANCELoperator is executed. By itself, with neitherLOCALnor a property list, it has no effect on the operator. -
LOCALKeyword. If specified after
NESTED, all local properties preserve their changes after theCANCELoperator is executed. -
propertyId1, ..., propertyIdNNon-empty list of local properties, specified after
NESTEDin parentheses. Each list element is a property ID. The local properties specified in the list will preserve their changes after the operator is executed. -
CLASSESKeyword. Can be written, but has no effect on the
CANCELoperator.
Examples
CLASS Sku;
in = DATA LOCAL BOOLEAN (Sku);
// bare cancel — drops every change accumulated in the current session
dropChanges() { CANCEL; }
// cancel that preserves a specific local property
dropChangesKeepIn() {
CANCEL NESTED (in[Sku]); // cancel all changes except the `in[Sku]` property
}
// cancel that preserves all local properties
dropChangesKeepAll() { CANCEL NESTED LOCAL; }