Menu

[r2509]: / trunk / Src / Help / HTML / task_generateunit.htm  Maximize  Restore  History

Download this file

86 lines (85 with data), 3.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
* Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
*
* Help topic describing how to generate a Pascal unit.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text-html; charset=Windows-1252">
<title>
Generate Unit
</title>
<link rel="stylesheet" href="../css/codesnip.css" type="text/css">
</head>
<body>
<h1>
<a name="task_savesnippet"></a>Generate a Pascal Unit
</h1>
<p>
You can generate source code for a Pascal unit and save it to disk as
follows.
</p>
<ol>
<li>
Select the snippets you want to include in the unit. The easiest way to
do this is to use the
<img
src="../Images/SelectRoutines.gif"
class="glyph"
alt="Select Snippets button"
> toolbar button (or select <em>Search | Select Snippets</em>) then
select the routines you require in the
<a href="dlg_selectroutines.htm">Select Snippets</a> dialogue box. (Note
that you can also select snippets using any of the program's search
options &ndash; see the <a href="task_search.htm">Search Database</a>
task for more information).
</li>
<li>
Click the
<img
src="../Images/SaveUnit.gif"
class="glyph"
alt="Save Unit button"
> toolbar button or choose the <em>File | Save Unit</em> menu option.
</li>
<li>
Enter the name of the unit in the <a href="dlg_saveunit.htm">Save Unit
dialogue box</a>. Ensure that the file name you select (without
extension) is a valid Pascal unit name.
</li>
<li>
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 <em>Preview</em> button.
</li>
<li>
Click <em>OK</em> to generate the unit.
</li>
</ol>
<p>
See the <a href="dlg_savesnippet.htm">Save Unit dialogue box</a> help
topic for detailed information about the available options.
</p>
<p>
Whether certain warnings are inihibited in the generated code can be
specified using the <a href="dlg_prefs_codegen.htm">Code Generation</a>
tab of the <a href="dlg_preferences.htm">Preferences dialogue
box</a>. The default commenting style, syntax highlighting and file type
can be also be configured using the
<a href="dlg_prefs_sourcecode.htm">Code Formatting</a> tab.
</p>
<p>
<a href="snippet_freeform.htm">Freeform</a> snippets cannot be included in
a unit. Any freeform snippets included in the current selection will be
ignored.
</p>
</body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.