Creating and using code templates
A code template is text that is automatically inserted into the body of new code element definitions. Code templates are extremely useful for enforcing or simplifying programming standards in a team or organization. You can specify uniform error handling, logging, or tracing code, and the LotusScript editor automatically inserts it each time you create a new code element, saving time and preventing accidentally ignoring the standard or making mistakes in its implementation.
About this task
Function IsPrime (X
As Integer) As Boolean
and press Enter,
the LotusScript Editor autocompletes the line to the following: <multiline comment templates are inserted here>
Function IsPrime (X As Integer) As Boolean
<multiline code templates are inserted here>
End Function
To view the current code templates, click , expand Domino Designer and LotusScript
Editor and click Code Templates.
You can then do the following: Procedure
- Click any element in the Code element listbox to see its template in the Code template field.
- Enable code templates. By default, code templates are disabled and every code template is set to a blank newline. To enable code templates, check Automatically include template in new code elements.
- Create a code template: