Generate a Pascal Unit

You can generate source code for a Pascal unit and save it to disk as follows.

  1. Select the snippets you want to include in the unit. The easiest way to do this is to use the Select Snippets button toolbar button (or select Search | Select Snippets) then select the routines you require in the Select Snippets dialogue box. (Note that you can also select snippets using any of the program's search options – see the Search Database task for more information).
  2. Click the Save Unit button toolbar button or choose the File | Save Unit menu option.
  3. Enter the name of the unit in the Save Unit dialogue box. Ensure that the file name you select (without extension) is a valid Pascal unit name.
  4. Choose the file type, the commenting style and whether you want the file syntax highlighted using the controls in the dialogue box. You can preview the file by using the dialogue box's Preview button.
  5. Click OK to generate the unit.

See the Save Unit dialogue box help topic for detailed information about the available options.

Whether certain warnings are inihibited in the generated code can be specified using the Code Generation tab of the Preferences dialogue box. The default commenting style, syntax highlighting and file type can be also be configured using the Code Formatting tab.

Freeform snippets cannot be included in a unit. Any freeform snippets included in the current selection will be ignored.