File: ok_include_environment.html

package info (click to toggle)
pasdoc 0.16.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,572 kB
  • sloc: pascal: 28,894; javascript: 7,665; xml: 2,597; makefile: 523; sh: 417
file content (163 lines) | stat: -rw-r--r-- 7,454 bytes parent folder | download | duplicates (2)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
<head>
<title>ok_include_environment</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li></ul></div><div class="content">
<h1 class="unit">Unit ok_include_environment</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section">Uses</div><div class="one_section">Classes, Interfaces, Objects and Records</div><div class="one_section">Functions and Procedures</div><div class="one_section">Types</div><div class="one_section"><a class="section" href="#PasDoc-Constants">Constants</a></div><div class="one_section">Variables</div></div>
<span id="PasDoc-Description"></span><h2 class="description">Description</h2>
<p>
Test of handling the &quot;<em>$I or $INCLUDE : Include compiler info</em>&quot; feature of FPC, see [<a href="http://www.freepascal.org/docs-html/prog/progsu38.html">http://www.freepascal.org/docs-html/prog/progsu38.html</a>].</p>
<p>


<p>PasDoc bug spotted by Michalis on 2005-12-04 when trying `make htmldocs' on fpc compiler sources, in file version.pas.

<p>Notes about how it should be implemented in PasDoc :

<p>PasDoc will <em>not</em> expand these macros. Instead PasDoc will just explicitly show that e.g. value of MacDATE is %DATE%, value of MacFPCTARGET is %FPCTARGET% etc. Reasons: </p>

<ul class="paragraph_spacing">
  <li><p>For %DATE% and %TIME%, PasDoc could expand them, but it's not sensible. After all, at compilation they will be set to something different. So what PasDoc should do (and will) is to show user that the value of MacDATE is %DATE%.

<p>This way user will know that MacDATE's value depends on time of compilation.</p></li>
  <li><p>For %FPC???% macros, PasDoc couldn't expand them, even if it should. After all, we don't know what FPC version will be used to compile the given unit.</p></li>
  <li><p>For %environment-variable%: argument like with %FPC???% macros: PasDoc is not able to predict what value $environment-variable will have at compilation time.</p></li>
  <li><p>Finally, for %FILE% and %LINE%: this is the only case when actually PasDoc could just expand them, just like FPC will.

<p>For now, my decision is to not expand them, for consistency with handling all other %xxx%.</p></li>
</ul>

<p></p>
<span id="PasDoc-Uses"></span><h2 class="overview">Overview</h2>
<span id="PasDoc-Constants"></span><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacDATE">MacDATE</a></strong> = {$I %DATE%};</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacFPCTARGET">MacFPCTARGET</a></strong> = {$I %FPCTARGET%};</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacFPCTARGETCPU">MacFPCTARGETCPU</a></strong> = {$I %FPCTARGETCPU%};</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacFPCTARGETOS">MacFPCTARGETOS</a></strong> = {$I %FPCTARGETOS%};</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacFPCVERSION">MacFPCVERSION</a></strong> = {$I %FPCVERSION%};</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacFILE">MacFILE</a></strong> = {$I %FILE%};</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacLINE">MacLINE</a></strong> = {$I %LINE%};</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacTIME">MacTIME</a></strong> = {$I %TIME%};</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacUSEREnv">MacUSEREnv</a></strong> = {$I %USER%};</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="ok_include_environment.html#MacPathEnv">MacPathEnv</a></strong> = {$I %PATH%};</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacDATE"></span><code><strong>MacDATE</strong> = {$I %DATE%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Inserts the current date.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacFPCTARGET"></span><code><strong>MacFPCTARGET</strong> = {$I %FPCTARGET%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Inserts the target CPU name. (deprecated, use FPCTARGETCPU)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacFPCTARGETCPU"></span><code><strong>MacFPCTARGETCPU</strong> = {$I %FPCTARGETCPU%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Inserts the target CPU name.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacFPCTARGETOS"></span><code><strong>MacFPCTARGETOS</strong> = {$I %FPCTARGETOS%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Inserts the target OS name.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacFPCVERSION"></span><code><strong>MacFPCVERSION</strong> = {$I %FPCVERSION%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Current compiler version number.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacFILE"></span><code><strong>MacFILE</strong> = {$I %FILE%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Filename in which the directive is found.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacLINE"></span><code><strong>MacLINE</strong> = {$I %LINE%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Linenumer on which the directive is found.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacTIME"></span><code><strong>MacTIME</strong> = {$I %TIME%};</code></td>
</tr>
<tr><td colspan="1">
<p>
Current time.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacUSEREnv"></span><code><strong>MacUSEREnv</strong> = {$I %USER%};</code></td>
</tr>
<tr><td colspan="1">
<p>
If xxx inside %xxx% is none of the above, then it is assumed to be the name of an environment variable. Its value will be fetched.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="MacPathEnv"></span><code><strong>MacPathEnv</strong> = {$I %PATH%};</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
</div></div></body></html>