Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
Constructs | NO | NO | NO | All |
Begin reversible block
This command begins a reversible block of commands. All reversible commands enclowsed within the commands Begin reversible block/End reversible block are reversed when the method containing this block finishes. However, a reversible block in the $construct() method of a window class reverses when the window is closed not when the method is terminated as is normally the case. Omnis always steps backwards through a reversible block of commands, thus the first command is reversed last.
Reversible blocks let you create subroutines that restore the values of variables, the current record buffer, and so on, to their previous state when the method terminates. Most commands are reversible: those that are not usually involve an irreversible action such as changing the data in an Omnis data file or running another program. Methods called from within a reversible block are not reversed.