All multiple-line logic windows, such as the Operation logic window of the Process edit table, include the editing function buttons shown in the following example. These buttons include Cut, Copy, Paste, Undo, Redo, Find, Build, Compile, Print, and Help.
Logic windows possess a number of features that facilitate the writing of logic, and two such features are line numbers and collapsible regions of logic.
Line Numbers — This feature facilitates the readability of the logic and the visual identification and recognition of various sections of the logic. With it, you can more easily recognize and recall individual lines of logic. You cannot remove or hide the line numbers, so they are always present next to the logic statements.
Collapsible Regions — This feature facilitates the readability and understandability of the logic and the visual compartmentalization of various portions of the logic. With it, you can hide selected portions of the logic in order to better understand the overall processing flow of the logic, or you can hide from view specific portions of the logic on which you do not want to concentrate.
To access this feature, you can either insert a blank line within existing logic, or you can add a blank line after existing logic. At the beginning of a blank line, type the number sign or pound sign (i.e., #), and the Intellisense feature will display the #region and #endregion delimiter statements. Select #region. The end of the region is delimited by #endregion, so you need to add a blank line after the last line of logic that you want contained within the logic region, and then similarly select #endregion to define the end of the region.
Note that you can arbitrarily label any region with a comment by typing a space and some text after #region. Such a label can be a helpful reminder about the logic contained within a collapsed region. To collapse a region of logic, click the minus sign immediately to the left of #region. Note that when a region is collapsed the remaining displayed line numbers are out of numerical sequence, and that the missing line numbers are hidden within the collapsed region. To expand a collapsed region, click the plus sign immediately to the left of the {...} region marker, which will appear where there are missing line numbers. If a label was given to the region, click the plus sign immediately to the left of the label. To remove the region, delete the two region delimiters and then delete the corresponding blank lines.
The Logic Window toolbar:
Build The Logic Builder, which may also be accessed by clicking the right mouse in the logic window button, is a tool that allows you to build logic without typing a single keystroke. Primarily for building logic in the logic windows, it may also be used for building expressions in expression fields.
Compile The Compile menu item checks the logic in the edit window to determine if it is complete and syntactically correct. If an error is found, an information dialog box with details regarding the error(s) appears. For example, the following error is a result of the incorrect spelling of Graphic.
Print Prints text, such as the operation logic for a single location, in a logic window and is helpful when you are trying to debug a model and need to work with particularly complex logic at certain locations.
Help Provides context-sensitive help.
© 2019 ProModel Corporation • 705 E Timpanogos Parkway • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com |