| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| Constructs | NO | NO | NO | All |
This command defines the end of a reversible block of commands. All reversible commands enclosed 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 and not when the method is terminated as is normally the case.
# A method can contain more than one block of reversible commands. In this case,# commands contained within all the blocks are reversed when the method terminates.
# All the commands in the following example are reversed when the method containing# the block is finished
Begin reversible blockDisable menu linemMyMenu/5Set current listiMyListBuild open window list(Clear list)CalculateiVaras0Open window instancewMyWindowEnd reversible block# When this block is reversed:# The window instance wMyWindow is closed# iVar returns to its former value# iMyList is restored to its former contents and definition# The current list is set to the former value# Menu line 5 is enabled
# The following method hides fields Entry1 and Entry2 and installs the menu mCustomers
Begin reversible blockHide fieldsEntry1,Entry2Install menumCustomersEnd reversible block
OK message(Icon){MCUSTOMERS is now visible}# When this method ends, first MCUSTOMERS is removed, then the fields are shown.
# In the following example, the current list is iMyList
Begin reversible blockSet current listiMyList2Define listfAccounts.Code,fAccounts.Surname,fAccounts.BalanceSet main filefAccounts# Build list from select tableEnter dataEnd reversible block# When this method terminates and the command block is reversed, the Main file is reset,# the former list definition is restored and the current list is restored to iMyList.