This dialogue box is displayed when the File | Save Unit menu option is clicked. It is used to specify the file name, file type and formatting information for the unit that is to be saved.
All currently selected snippets, with the exception of any freeform snippets, are included in the generated unit. (See the Search Database task for information on how to select the required snippets).
The dialogue is a standard Windows save dialogue box with a few added options.
You specify the name and folder for the file where the unit will be saved in in the usual way. Warning: the chosen file name, minus its extension must be a valid Pascal unit name.
Use the Save as type drop down list to specify the type of file to be saved. Options are:
Each snippet's description can be written as a Pascal comment to the output file. Use the Comment style drop down list to specify the style of commenting to be used. Such comments can be inhibited by selecting the No descriptive comments option from the list. If the Truncate comments to 1st paragraph check box is ticked then only the first paragraph of each snippet's description is used. Clearing this check box means that the full text of snippet descriptions are used.
The output file encoding can be be specified in the File Encoding drop down list. Options vary depending on the file type. Some file types support only a single encoding. The encodings are:
The output can be previewed by clicking the Preview button. This displays the source code in a dialogue box, formatted according to your selections. Text in the preview can be selected and copied to the clipboard if required.
Use the Save button to write the unit to disk or Cancel to abort.
† BOM = Byte Order Mark or Preamble: a sequence of bytes at the start of a text file that identifies its encoding.