A new feature of MZ-Tools 8.0 is the Switch Assignment, a handy feature that allows you to swap the members of an assignment between variables. For example, suppose that you have a Person user-defined type with three fields (Id, FirstName and LastName) and a form with three textboxes. When you load the form, you want to show the values in the textboxes with this subroutine:
When the form is closed, you want to fill the user-defined type with the new values from the textboxes. You can copy the code from the previous subroutine:
And with the cursor on the first assignment you invoke the Switch Assignment feature:
Notice that the assignment has been swapped and the cursor has been moved to the next line, ready for a new operation. But you can select several assignments:
And swap all of them with one click:
So, the Switch Assignment feature can save time performing those mechanical operations, allowing you to become more productive.