Download Total Visual CodeTools Manual
Transcript
For Best Practices, it’s preferable to explicitly declare the procedure as Public, Private, or Friend to avoid any confusion. See Use Narrow Variable Scoping on page 166. Static A static procedure preserves its local variables between procedure calls. Select this check box to add the Static keyword to your procedure definition. Make sure you understand the implications of making the procedure static before selecting this option— you may want to consider using static variables instead of static procedures. Procedure Type Specify whether the procedure is a “Sub” or “Function”: For functions, you can specify the data type for the return value. Checking the Return Value option adds a line in your function with the procedure name and a default value based on the Return Type. Options There are two additional options: Comments Select this to add your comment structure into the new procedure. The Comments are customized under Standards, Commenting, New Proc tab (see page 35). Through the use of Tokens, you can include your procedure name, current date/time, developer initials, etc. into your comment. Body Only There may be cases where you only want the Procedure Builder to generate the body of the new code, and not include the procedure declaration or the Total Visual CodeTools Chapter 4: Code Builders 75