root/trunk/docsrc/doc.ddoc

Revision 2154, 16.8 kB (checked in by walter, 1 year ago)

bugzilla 2572 2nd try

  • Property svn:eol-style set to native
Line 
1 DDOC=
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3 <html lang="en-US">
4
5 <!--
6     Copyright (c) 1999-$(YEAR) by Digital Mars
7     All Rights Reserved Written by Walter Bright
8     http://www.digitalmars.com
9   -->
10
11 <head>
12 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
13 <meta name="keywords" content="$(META_KEYWORDS)" />
14 <meta name="description" content="$(META_DESCRIPTION)" />
15 <title>$(TITLE) - D Programming Language $(VER) - Digital Mars</title>
16 <link rel="stylesheet" type="text/css" href="style.css" />
17 <link rel="stylesheet" type="text/css" href="print.css" media="print" />
18 <link rel="shortcut icon" href="favicon.ico" />
19
20 <!-- enable this for automated hyphenation, see http://code.google.com/p/hyphenator/ -->
21 <!--
22 <script src="http://erdani.com/js/Hyphenator.js" type="text/javascript"></script>
23 <script type="text/javascript">Hyphenator.run();</script>
24 -->
25
26 </head>
27
28 <body class="hyphenate">
29 <div id="heading">
30     <a href="http://www.digitalmars.com/"><img src="dmlogo.gif" width="270" height="53" style="border-style:none" alt="www.digitalmars.com" align="left"></a>
31     <p align="right">D Programming Language $(VER)</p>
32     <br>
33
34     <div id="headingNav">
35     $(UL
36     $(LI <a href="http://www.digitalmars.com/NewsGroup.html" title="User Forums">$(NEWSIMG) Forum</a>)
37     $(LI <a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" title="Read/write comments and feedback">$(WIKIIMG) Wiki</a>)
38     $(LI <a href="index.html" title="D Programming Language" class="dlink">&nbsp;$(DIMG)&nbsp;</a>)
39     $(LI <a href="http://www.digitalmars.com/advancedsearch.html" title="Search Digital Mars web site">$(SEARCHIMG)Search</a>)
40     $(LI <a href="http://www.digitalmars.com/d/download.html" title="download D">$(DOWNLOADIMG)Downloads</a>)
41     $(LI <a href="http://www.digitalmars.com/" title="www.digitalmars.com">$(HOMEIMG)Home</a>)
42     )
43     </div>
44
45     <div id="lastupdate">Last update $(DATETIME)</div>
46 </div>
47
48 $(BODY)
49 $(FOOTER)
50 </body>
51 </html>
52
53 GOOGLE_FOOTER=
54 <br><br>
55 <br><br>
56 <!-- Google ad -->
57 <script type="text/javascript"><!--
58 /**/google_ad_client = "pub-5628673096434613";
59 /**/google_ad_width = 728;
60 /**/google_ad_height = 90;
61 /**/google_ad_format = "728x90_as";
62 /**/google_ad_channel ="3651639259";
63 /**/google_page_url = document.location;
64 //--></script>
65 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
66 </script>
67
68 GOOGLE_REFERRAL=
69 <br><br>
70 <br><br>
71 <script type="text/javascript"><!--
72 /**/google_ad_client = "pub-5628673096434613";
73 /* 180x150, created 2/18/08 */
74 /**/google_ad_slot = "4228873179";
75 /**/google_ad_width = 180;
76 /**/google_ad_height = 150;
77 /**/google_cpa_choice = ""; // on file
78 //-->
79 </script>
80 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
81 </script>
82 GOOGLE_REFERRAL=
83
84 COPYRIGHT=
85 Copyright &copy; 1999-$(YEAR) by Digital Mars &reg;, All Rights Reserved
86
87 FOOTER=
88 <div id="footernav">
89 <a href="http://www.digitalmars.com/NewsGroup.html" title="User Forums">Forums</a> |
90 <a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" title="Read/write comments and feedback">Comments</a> |
91 <a href="index.html" title="D Programming Language" class="dlink">&nbsp;D&nbsp;</a> |
92 <a href="http://www.digitalmars.com/advancedsearch.html" title="Search Digital Mars web site">Search</a> |
93 <a href="http://www.digitalmars.com/d/download.html" title="download D">Downloads</a> |
94 <a href="http://www.digitalmars.com/" title="www.digitalmars.com">Home</a>
95 </div>
96 <div id="copyright">
97 $(COPYRIGHT) |
98 Page generated by $(LINK2 http://www.digitalmars.com/d/$(VER)/ddoc.html, Ddoc).
99 </div>
100
101 TOP=
102 <div class="navblock">
103 <form method="get" action="http://www.google.com/search">
104 <div id="searchbox">
105 <input id="q" name="q" size="10" value="Search" onFocus='if(this.value == "Search"){this.value="";}'>
106 <input type="hidden" id="domains" name="domains" value="www.digitalmars.com">
107 <input type="hidden" id="sitesearch" name="sitesearch" value="www.digitalmars.com/d/$(VER)">
108 <input type="hidden" id="sourceid" name="sourceid" value="google-search">
109 <input type="submit" id="submit" name="submit" value="Go">
110 </div>
111 </form>
112 <div id="toctop">
113     $(UL
114     $(LI <a href="index.html" title="D Programming Language">D $(VER) Home</a>)
115     $(LI <a href="lex.html" title="D Language Specification">Language Reference</a>)
116     $(LI <a href="phobos/phobos.html" title="D Runtime Library">Library Reference</a>)
117     $(LI <a href="comparison.html" title="Language Comparisons">Comparisons</a>)
118     $(LI <a href="http://www.digitalmars.com/d/1.0/index.html" title="D Programming Language 1.0">D1 Home</a>)
119     )
120 </div>
121 </div>
122
123 NAVIGATION_COMMUNITY=
124     <div class="navblock">
125     $(UL
126     $(TOCENTRY comparison.html, D Feature List)
127     $(TOCENTRY builtin.html,    Rationale for Builtins)
128     $(TOCENTRY ctod.html,       Converting C to D)
129     $(TOCENTRY cpptod.html,     Converting C++ to D)
130     $(TOCENTRY pretod.html, The C Preprocessor vs D)
131     $(TOCENTRY template-comparison.html, D templates compared)
132     $(TOCENTRY cppstrings.html, D strings vs C++ std::string)
133     $(TOCENTRY cppcomplex.html, D complex vs C++ std::complex)
134     $(TOCENTRY cppdbc.html,     D Contract Programming vs C++)
135     $(TOCENTRY lisp-java-d.html, Lisp vs. Java... D?)
136     $(TOCENTRY cpp0x.html, D and C++0x)
137     )
138     </div>
139     $(TRANSLATIONS)
140     $(GOOGLE_REFERRAL)
141
142 NAVIGATION_SPEC=
143     <div class="navblock">
144     $(UL
145     $(TOCENTRY lex.html, Lexical)
146     $(TOCENTRY module.html, Modules)
147     $(TOCENTRY declaration.html, Declarations)
148     $(TOCENTRY type.html, Types)
149     $(TOCENTRY property.html, Properties)
150     $(TOCENTRY attribute.html, Attributes)
151     $(TOCENTRY pragma.html, Pragmas)
152     $(TOCENTRY expression.html, Expressions)
153     $(TOCENTRY statement.html, Statements)
154     $(TOCENTRY arrays.html, Arrays)
155     $(TOCENTRY hash-map.html, Associative Arrays)
156     $(TOCENTRY struct.html, Structs &amp; Unions)
157     $(TOCENTRY class.html, Classes)
158     $(TOCENTRY interface.html, Interfaces)
159     $(TOCENTRY enum.html, Enums)
160     $(TOCENTRY const3.html, Const and Immutable)
161     $(TOCENTRY function.html, Functions)
162     $(TOCENTRY operatoroverloading.html, Operator Overloading)
163     $(TOCENTRY template.html, Templates)
164     $(TOCENTRY template-mixin.html, Template Mixins)
165     $(TOCENTRY dbc.html, Contracts)
166     $(TOCENTRY version.html, Conditional Compilation)
167     $(TOCENTRY traits.html, Traits)
168     $(TOCENTRY errors.html, Handling errors)
169     $(TOCENTRY unittest.html, Unit Tests)
170     $(TOCENTRY garbage.html, Garbage Collection)
171     $(TOCENTRY float.html, Floating Point)
172     $(TOCENTRY iasm.html, Inline Assembler)
173     $(TOCENTRY ddoc.html, Documentation Comments)
174     $(TOCENTRY interfaceToC.html, Interfacing To C)
175     $(TOCENTRY cpp_interface.html, Interfacing To C++)
176     $(TOCENTRY portability.html, Portability Guide)
177     $(TOCENTRY html.html, Embedding D in HTML)
178     $(TOCENTRY entity.html, Named Character Entities)
179     $(TOCENTRY memory-safe-d.html, Memory Safe D Spec)
180     $(TOCENTRY abi.html, Application Binary Interface)
181     )
182     </div>
183     $(TRANSLATIONS)
184     $(GOOGLE_REFERRAL)
185
186
187 NAVIGATION_D=
188     <div class="navblock">
189     $(UL
190         $(TOCENTRYT overview.html, D language overview, Overview)
191         $(TOCENTRYT windows.html, D implementation for 32 bit Windows systems, D for Win32)
192         $(TOCENTRYT dll.html, Writing 32 bit Windows DLLs in D, Win32 DLLs in D)
193         $(TOCENTRYT COM.html, Windows COM Programming, COM Programming)
194         $(TOCENTRYT htomodule.html, converting C .h header files to D modules, C .h to D Modules)
195         $(TOCENTRYT faq.html, Frequently Asked Questions, FAQ)
196         $(TOCENTRYT const-faq.html, Frequently Asked Questions about const, const(FAQ))
197         $(TOCENTRYT dstyle.html, Recommended programming style conventions, Style Guide)
198         $(TOCENTRYT wc.html, wc - the wordcount program, Example: wc)
199         $(TOCENTRYT future.html, Future directions, Future)
200         $(TOCENTRYT changelog.html, History of changes to D, D Change Log)
201         $(TOCENTRYT features2.html, Language changes for D $(VER), $(VER) Features)
202         $(TOCENTRYT http://www.digitalmars.com/techtips/index.html, Programming tips, Tech Tips)
203         $(TOCENTRYT rationale.html, Answers to questions about D design decisions, Rationale)
204         $(TOCENTRYT warnings.html, Explanation of D compiler generated warning messages, Warnings)
205         $(TOCENTRYT http://d.puremagic.com/issues/, D issue and bug tracking system, Issues &amp; Bugs)
206     )
207     </div>
208
209     <div class="navblock">
210     <h2>Articles</h2>
211     $(UL
212         $(TOCENTRYT d-floating-point.html, D Floating Point, Floating Point)
213         $(TOCENTRYT migrate-to-shared.html, Migrating to Shared, Migrating to Shared)
214         $(TOCENTRYT hijack.html, Function Hijacking Mitigation, Hijacking)
215         $(TOCENTRYT const3.html, Const and Immutable, Const)
216         $(TOCENTRYT memory.html, Memory management techniques in D, Memory Management)
217         $(TOCENTRYT exception-safe.html, Exception safe programming techniques, Exception Safety)
218         $(TOCENTRYT templates-revisited.html, D takes a fresh look at template design, Templates Revisited)
219         $(TOCENTRYT regular-expression.html, Programming with regular expressions, Regular Expressions)
220         $(TOCENTRYT lazy-evaluation.html, Lazy evaluation of function arguments, Lazy Evaluation)
221         $(TOCENTRYT variadic-function-templates.html, Variadic arguments to templates, Variadic Templates)
222         $(TOCENTRYT tuple.html, What tuples are and how to use them, Tuples)
223         $(TOCENTRYT mixin.html, String mixins compile string literals into D programs, Mixins)
224         $(TOCENTRYT safed.html, SafeD - The Safe Subset of D, SafeD)
225     )
226     </div>
227
228     <div class="navblock">
229     <h2>Tools</h2>
230     $(UL
231         $(TOCENTRYT dmd-linux.html, dmd - the Digital Mars D compiler, DMD D Compiler (Linux))
232         $(TOCENTRYT dmd-freebsd.html, dmd - the Digital Mars D compiler, DMD D Compiler (FreeBSD))
233         $(TOCENTRYT dmd-osx.html, dmd - the Digital Mars D compiler, DMD D Compiler (Mac OSX))
234         $(TOCENTRYT dmd-windows.html, dmd - the Digital Mars D compiler, DMD D Compiler (Windows))
235         $(TOCENTRYT http://bitbucket.org/goshawk/gdc/wiki/Home, gdc - the Gnu D compiler, GDC D Compiler)
236         $(TOCENTRYT http://www.digitalmars.com/ctg/optlink.html, Optlink - the Digital Mars Linker, Linker)
237         $(TOCENTRYT http://www.digitalmars.com/ctg/trace.html, DMD's builtin code profiling tool, Profiler)
238         $(TOCENTRYT code_coverage.html, DMD's builtin code coverage analysis tool, Code Coverage)
239         $(TOCENTRYT rdmd.html, rdmd - run D programs as if they were scripts, DMD Script Shell)
240         $(TOCENTRYT windbg.html, windbg - debugging Windows programs, Windows Debugger)
241         $(TOCENTRYT htod.html, htod - mechanically convert C .h header files to D, C .h to D .d)
242         $(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport, Editors with support for D, Editors)
243         $(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?ReferenceForTools, Even more tools for D, More Tools)
244     )
245     </div>
246
247     <div class="navblock">
248     <h2>Forums</h2>
249     $(UL
250         $(TOCENTRYT http://www.digitalmars.com/NewsGroup.html, User Forums, All Forums)
251         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/index.html, digitalmars.D)
252         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/announce/index.html, digitalmars.D.announce)
253         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/dwt/index.html, digitalmars.D.dwt)
254         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/learn/index.html, digitalmars.D.learn)
255         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/bugs/index.html, digitalmars.D.bugs)
256         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/debugger/index.html, digitalmars.D.debugger)
257         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/ide/index.html, digitalmars.D.ide)
258         $(TOCENTRY http://www.digitalmars.com/d/archives/digitalmars/D/dtl/index.html, digitalmars.D.dtl)
259         $(TOCENTRY http://www.digitalmars.com/d/archives/D/gnu/index.html, D.gnu)
260         $(TOCENTRY http://www.digitalmars.com/d/archives/index.html, Old D)
261     )
262     </div>
263
264     <div class="navblock">
265     <h2>Community</h2>
266     $(UL
267         $(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage, Wiki for the D Programming Language, Wiki)
268         $(TOCENTRYT http://stackoverflow.com/questions/tagged/d, D on stackoverflow.com, Stackoverflow)
269         $(TOCENTRYT http://twitter.com/#search?q=%23d_lang, #d_lang on twitter.com, Twitter)
270         $(TOCENTRYT http://www.digitalmars.com/d/dlinks.html, External D related links, Links)
271         $(TOCENTRYX http://www.digitalmars.com/d/dnews.html, News Digest)
272         $(TOCENTRYX http://d.puremagic.com/conference2008/, D Programming Language Conference, Conference)
273     )
274     </div>
275
276     <div class="navblock">
277     <h2>Appendices</h2>
278     $(UL
279         $(TOCENTRYT glossary.html, D acronyms and jargon explained, Glossary)
280         $(TOCENTRYT ascii-table.html, Handy ascii chart, Ascii Table)
281         $(TOCENTRYT acknowledgements.html, Thank-you to these people who have helped with D, Acknowledgements)
282     )
283     </div>
284
285     $(TRANSLATIONS)
286     $(GOOGLE_REFERRAL)
287     <p><center>$(SLASHDOT)</center></p>
288
289 D_S      = $(LAYOUT $(NAVIGATION_D),         $1, $(ARGS $+))
290 SPEC_S   = $(LAYOUT $(NAVIGATION_SPEC),      $1, $(ARGS $+))
291 COMMUNITY= $(LAYOUT $(NAVIGATION_COMMUNITY), $1, $(ARGS $+))
292
293 LAYOUT=
294 <div id="navigation">
295   $(TOP)
296   $1
297 </div>
298 <div id="content">
299   <h1>$2</h1>
300   $3
301   $(GOOGLE_FOOTER)
302 </div>
303
304
305 TOCENTRY = $(LI $(LINK2 $1, $+))
306 TOCENTRYT = $(LI <a href="$1" title="$2">$3</a>)
307
308 D = $(RED $(B D))
309
310 ARGS=$0
311 RPAREN = )
312 LPAREN = (
313 TABLE1 = <table border=1 cellpadding=4 cellspacing=0>$0</table>
314 TABLE2 = <table border=1 cellpadding=4 cellspacing=0><caption>$1</caption>$+</table>
315 TH=<th scope="col">$0</th>
316 BLOCKQUOTE = <blockquote><p>$0</p></blockquote>
317 TT=<tt>$0</tt>
318 SUB=<sub>$0</sub>
319 LNAME2=<a name="$1">$+</a>
320 SECTION1=<h1>$1</h1>$+
321 SECTION2=<h2>$1</h2>$+
322 SECTION3=<h3>$1</h3>$+
323 SECTION4=<h4>$1</h4>$+
324 SINGLEQUOTE= &lsquo;$0&rsquo;
325 DOUBLEQUOTE= &ldquo;$0&rdquo;
326
327 NOTRANSLATE=<code>$0</code>
328 NOTRANSLATE=<span class="notranslate">$0</span>
329 D_CODE = <pre class="d_code">$(NOTRANSLATE $0)</pre>
330 D_COMMENT = <span class="d_comment">$0</span>
331 D_STRING  = <span class="d_string">$0</span>
332 D_KEYWORD = <span class="d_keyword">$0</span>
333 D_PSYMBOL = <span class="d_psymbol">$0</span>
334 D_PARAM   = <span class="d_param">$0</span>
335
336 CODE=<tt>$(NOTRANSLATE $0)</tt>
337 CCODE=<pre class="ccode">$(NOTRANSLATE $0)</pre>
338 CPPCODE=<pre class="cppcode">$(NOTRANSLATE $0)</pre>
339 GRAMMAR=<pre class="bnf">$(NOTRANSLATE $0)</pre>
340 DDOCCODE=<pre class="ddoccode">$(NOTRANSLATE $0)</pre>
341 SCINI=<pre class="scini">$(NOTRANSLATE $0)</pre>
342 CONSOLE=<pre class="console">$(NOTRANSLATE $0)</pre>
343 MODDEFFILE=<pre class="moddeffile">$(NOTRANSLATE $0)</pre>
344
345 NEWS=http://www.digitalmars.com/drn-bin/wwwnews?$1/$+
346 NEWS=http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=$1&artnum=$+
347 NEWS=http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=$1&article_id=$+
348
349 NEWSGROUP=http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=$0
350
351 NG_cpp = <a href="$(NEWS c%2B%2B,$0)">c++/$0</a>
352 NG_cpp_beta = <a href="$(NEWS c%2B%2B.beta,$0)">c++.beta/$0</a>
353 NG_cpp_command_line = <a href="$(NEWS c%2B%2B.command-line,$0)">c++.command-line/$0</a>
354 NG_D = <a href="$(NEWS D.gnu,$0)">D/$0</a>
355 NG_D_gnu = <a href="$(NEWS D.gnu,$0)">D.gnu/$0</a>
356 NG_digitalmars_D = <a href="$(NEWS digitalmars.D,$0)">D/$0</a>
357 NG_digitalmars_D_bugs = <a href="$(NEWS digitalmars.D.bugs,$0)">D.bugs/$0</a>
358 NG_digitalmars_D_learn = <a href="$(NEWS digitalmars.D.learn,$0)">D.learn/$0</a>
359 NG_digitalmars_D_announce = <a href="$(NEWS digitalmars.D.announce,$0)">D.announce/$0</a>
360 NG_DMDScript = <a href="$(NEWS DMDScript,$0)">DMDScript/$0</a>
361
362 OPT=<sub>opt</sub>
363 GLINK=$(LINK2 #$0, $(I $0))
364 GLINK2=$(LINK2 $1.html#$2, $(I $2))
365 GNAME=$(LNAME2 $0, $0)
366 ASSIGNEXPRESSION=$(LINK2 expression.html#AssignExpression, $(I AssignExpression))
367 ISEXPRESSION=$(LINK2 expression.html#IsExpression, $(I IsExpression))
368 META_KEYWORDS=D programming language
369 META_DESCRIPTION=D Programming Language
370 ACRONYM=<acronym title="$+">$1</acronym> ($+)
371 SFINAE=$(LINK2 glossary.html#sfinae, $(ACRONYM SFINAE, Substitution Failure Is Not An Error))
372 COMMA=,
373 VER=2.0
374 V1=
375 V2=$0
376 DIGG=<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
377 SLASHDOT=<script src="http://slashdot.org/slashdot-it.js" type="text/javascript"></script>
378 HOMEIMG=<img src="home.png" border=0 alt="digitalmars.com">
379 SEARCHIMG=<img src="search.png" border=0 alt="Search">
380 DOWNLOADIMG=<img src="download.png" border=0 alt="Download">
381 WIKIIMG=<img src="wiki.png" border=0 alt="D Wiki">
382 DIMG=<img src="d.png" border=0 alt="D Programming Language">
383 NEWSIMG=<img src="http://www.digitalmars.com/news.png" border=0 alt="User Forums">
384 OBJ2ASM=$(LINK2 http://www.digitalmars.com/ctg/obj2asm.html, obj2asm)
385 DUMPOBJ=$(LINK2 http://www.digitalmars.com/ctg/dumpobj.html, dumpobj)
386 SHELL=$(LINK2 http://www.digitalmars.com/ctg/shell.html, shell)
387 PHOBOSSRC=$(LINK2 http://www.dsource.org/projects/phobos/browser/trunk/phobos/$0, $0)
388 DRUNTIMESRC=$(LINK2 http://www.dsource.org/projects/druntime/browser/trunk/src/$0, $0)
389 DOLLAR=$
390
391 AMAZON= <iframe src="http://rcm.amazon.com/e/cm?t=classicempire&o=1&p=8&l=as1&asins=$0&fc1=000000&IS2=1&lt1=_blank&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
392 AMAZONLINK= $(LINK2 http://www.amazon.com/exec/obidos/ASIN/$1/classicempire, $+)
393
394 FOO=FOO
Note: See TracBrowser for help on using the browser.