Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

429 lines (390 sloc) 18.14 kB
DDOC=
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<!--
Copyright (c) 1999-$(YEAR) by Digital Mars
All Rights Reserved Written by Walter Bright
http://www.digitalmars.com
-->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="$(META_KEYWORDS)" />
<meta name="description" content="$(META_DESCRIPTION)" />
<title>$(TITLE) - D Programming Language $(VER) - Digital Mars</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- enable this for automated hyphenation, see http://code.google.com/p/hyphenator/ -->
<!--
<script src="http://erdani.com/js/Hyphenator.js" type="text/javascript"></script>
<script type="text/javascript">Hyphenator.run();</script>
-->
<script type="text/javascript">
function bodyLoad()
{
var links = document.getElementById("navigation").getElementsByTagName("a");
for (var i = 0; i < links.length; i++)
{
var url = "/" + links[i].getAttribute("href");
if (window.location.href.match(url + "\x24") == url)
{
var cls = links[i].getAttribute("class");
links[i].setAttribute("class", cls ? cls + " active" : "active");
break;
}
}
}
</script>
</head>
<body onload="bodyLoad()">
<div id="top">
<form method="get" action="http://www.google.com/search">
<div id="search-box">
<img src="images/search-left.gif" width="11" height="22" /><input id="q" name="q" /><input type="image" id="search-submit" name="submit" src="images/search-button.gif" />
<input type="hidden" id="domains" name="domains" value="www.digitalmars.com" />
<input type="hidden" id="sourceid" name="sourceid" value="google-search" />
<div id="search-dropdown">
<select id="sitesearch" name="sitesearch" size="1">
<option value="www.digitalmars.com/d/$(VER)">Entire D $(VER) Site</option>
<option value="www.digitalmars.com/d/$(VER)/phobos">Library Reference</option>
<option value="www.digitalmars.com/d/archives">Newsgroup Archives</option>
</select>
</div>
</div>
</form>
<div id="header">
<!--a href="http://www.digitalmars.com"><img id="logo" width="253" height="37" border="0" alt="Digital Mars" src="images/dmlogo.gif"></a-->
<div id="d-language"><a href="">D Programming Language $(VER)</a></div>
</div>
</div>
$(BODY)
$(FOOTER)
</body>
</html>
PAGE_TOOLS=
<div id="tools">
<span id="lastupdate">Last update $(DATETIME)</span>
<span id="wiki"><a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)">Comment on this page</a></span>
</div>
GOOGLE_TRANSLATE=
<div id="translate" class="tool"><script type="text/javascript">document.write("Translate this page:")</script>
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
autoDisplay: false,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div>
GOOGLE_FOOTER=
<div id="google_ad">
<!-- Google ad -->
<script type="text/javascript"><!--
/**/google_ad_client = "pub-5628673096434613";
/**/google_ad_width = 728;
/**/google_ad_height = 90;
/**/google_ad_format = "728x90_as";
/**/google_ad_channel ="3651639259";
/**/google_page_url = document.location;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
GOOGLE_REFERRAL=
<br><br>
<br><br>
<script type="text/javascript"><!--
/**/google_ad_client = "pub-5628673096434613";
/* 180x150, created 2/18/08 */
/**/google_ad_slot = "4228873179";
/**/google_ad_width = 180;
/**/google_ad_height = 150;
/**/google_cpa_choice = ""; // on file
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
GOOGLE_REFERRAL=
COPYRIGHT=
Copyright &copy; 1999-$(YEAR) by Digital Mars &reg;, All Rights Reserved
FOOTER=
<div id="footernav">
<a href="http://www.digitalmars.com/NewsGroup.html" title="User Forums">Forums</a> |
<a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" title="Read/write comments and feedback">Comments</a> |
<a href="index.html" title="D Programming Language" class="dlink">&nbsp;D&nbsp;</a> |
<a href="http://www.digitalmars.com/advancedsearch.html" title="Search Digital Mars web site">Search</a> |
<a href="download.html" title="Download D">Downloads</a> |
<a href="http://www.digitalmars.com/" title="www.digitalmars.com">Home</a>
</div>
<div id="copyright">
$(COPYRIGHT) |
Page generated by $(LINK2 ddoc.html, Ddoc).
</div>
NAVIGATION_COMMUNITY=
<div class="navblock">
$(UL
$(TOCENTRY comparison.html, D Feature List)
$(TOCENTRY builtin.html, Rationale for Builtins)
$(TOCENTRY ctod.html, Converting C to D)
$(TOCENTRY cpptod.html, Converting C++ to D)
$(TOCENTRY pretod.html, The C Preprocessor vs D)
$(TOCENTRY template-comparison.html, D templates compared)
$(TOCENTRY cppstrings.html, D strings vs C++ std::string)
$(TOCENTRY cppcomplex.html, D complex vs C++ std::complex)
$(TOCENTRY cppdbc.html, D Contract Programming vs C++)
$(TOCENTRY lisp-java-d.html, Lisp vs. Java... D?)
$(TOCENTRY cpp0x.html, D and C++0x)
)
</div>
$(BOOKS)
$(TRANSLATIONS)
$(GOOGLE_REFERRAL)
NAVIGATION=
$(NAVBLOCK_HEADER $(TOCHEADERL index.html, D Programming Language, D $(VER) Home),
$(TOCENTRYTH overview.html, D language overview, Overview, $(CATEGORY_OVERVIEW $(SUBNAV_OVERVIEW)))
$(TOCENTRYTH comparison.html, D feature list, Features, $(CATEGORY_FEATURES $(SUBNAV_FEATURES)))
$(TOCENTRYTH download.html, Download a D compiler, Downloads &amp; Tools, $(CATEGORY_TOOLS $(SUBNAV_DOWNLOADS_TOOLS)))
$(TOCENTRYTH faq.html, Frequently Asked Questions, FAQ, $(CATEGORY_FAQ $(SUBNAV_FAQ)))
$(TOCENTRYH appendices.html, Appendices, $(CATEGORY_APPENDICES $(SUBNAV_APPENDICES)))
$(TOCENTRYT acknowledgements.html, Thank-you to these people who have helped with D, Acknowledgements)
$(TOCENTRYT http://www.digitalmars.com/d/1.0/index.html, D Programming Language 1.0, D1 Home)
)
$(NAVBLOCK_HEADER $(TOCHEADER Documentation),
$(TOCENTRYH language-reference.html, Language Reference, $(CATEGORY_SPEC $(SUBNAV_SPEC)))
$(TOCENTRY phobos/index.html, Library Reference)
$(TOCENTRYTH howtos.html, Helps for using D, Howtos, $(CATEGORY_HOWTOS $(SUBNAV_HOWTOS)))
$(TOCENTRYH articles.html, Articles, $(CATEGORY_ARTICLES $(SUBNAV_ARTICLES)))
)
$(NAVBLOCK_HEADER $(TOCHEADER Community),
$(TOCENTRYT http://www.digitalmars.com/NewsGroup.html, User forums, Forums)
$(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage, Wiki for the D Programming Language, Wiki)
$(TOCENTRYT http://www.dsource.org/, D projects and libraries at dsource.org, Projects &amp; Libraries)
$(TOCENTRYT http://twitter.com/#search?q=%23d_lang, #d_lang on twitter.com, Twitter)
$(TOCENTRYT http://www.digitalmars.com/d/dlinks.html, External D related links, Links)
$(TOCENTRYX http://www.digitalmars.com/d/dnews.html, News Digest)
$(TOCENTRYX http://d.puremagic.com/conference2008/, D Programming Language Conference, Conference)
)
SUBNAV_OVERVIEW=
$(NAVBLOCK
$(TOCENTRYT wc.html, wc - the wordcount program, Example: wc)
$(TOCENTRYT warnings.html, Explanation of D compiler generated warning messages, Warnings)
$(TOCENTRY builtin.html, Rationale for Builtins)
$(TOCENTRY ctod.html, Converting C to D)
$(TOCENTRY cpptod.html, Converting C++ to D)
$(TOCENTRY pretod.html, The C Preprocessor vs D)
$(TOCENTRY template-comparison.html, D templates compared)
$(TOCENTRY cppstrings.html, D strings vs C++ std::string)
$(TOCENTRY cppcomplex.html, D complex vs C++ std::complex)
$(TOCENTRY cppdbc.html, D Contract Programming vs C++)
$(TOCENTRY lisp-java-d.html, Lisp vs. Java... D?)
$(TOCENTRY cpp0x.html, D and C++0x)
)
SUBNAV_FEATURES=
$(NAVBLOCK
$(TOCENTRYT features2.html, Language changes for D $(VER), $(VER) Features)
)
SUBNAV_DOWNLOADS_TOOLS=
$(NAVBLOCK
$(TOCENTRYT dmd-linux.html, dmd - the Digital Mars D compiler, DMD D Compiler (Linux))
$(TOCENTRYT dmd-freebsd.html, dmd - the Digital Mars D compiler, DMD D Compiler (FreeBSD))
$(TOCENTRYT dmd-osx.html, dmd - the Digital Mars D compiler, DMD D Compiler (Mac OSX))
$(TOCENTRYT dmd-windows.html, dmd - the Digital Mars D compiler, DMD D Compiler (Windows))
$(TOCENTRYT changelog.html, History of changes to D, D Change Log)
$(TOCENTRYT http://bitbucket.org/goshawk/gdc/wiki/Home, gdc - the Gnu D compiler, GDC D Compiler)
$(TOCENTRYT http://dnet.codeplex.com/, D Compiler for .NET, D.NET Compiler)
$(TOCENTRYT http://www.digitalmars.com/ctg/optlink.html, Optlink - the Digital Mars Linker, Linker)
$(TOCENTRYT http://www.digitalmars.com/ctg/trace.html, DMD's builtin code profiling tool, Profiler)
$(TOCENTRYT code_coverage.html, DMD's builtin code coverage analysis tool, Code Coverage)
$(TOCENTRYT rdmd.html, rdmd - run D programs as if they were scripts, DMD Script Shell)
$(TOCENTRYT windbg.html, windbg - debugging Windows programs, Windows Debugger)
$(TOCENTRYT htod.html, htod - mechanically convert C .h header files to D, C .h to D .d)
$(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport, Editors with support for D, Editors)
$(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?ReferenceForTools, Even more tools for D, More Tools)
$(TOCENTRYT http://d.puremagic.com/issues/, D issue and bug tracking system, Issues &amp; Bugs)
)
SUBNAV_FAQ=
$(NAVBLOCK
$(TOCENTRYT const-faq.html, Frequently Asked Questions about const, const(FAQ))
$(TOCENTRYT rationale.html, Answers to questions about D design decisions, Rationale)
$(TOCENTRYT future.html, Future directions, Future)
)
SUBNAV_APPENDICES=
$(NAVBLOCK
$(TOCENTRYT dstyle.html, Recommended programming style conventions, Style Guide)
$(TOCENTRYT glossary.html, D acronyms and jargon explained, Glossary)
$(TOCENTRYT ascii-table.html, Handy ascii chart, Ascii Table)
)
SUBNAV_SPEC=
$(NAVBLOCK
$(TOCENTRY lex.html, Lexical)
$(TOCENTRY module.html, Modules)
$(TOCENTRY declaration.html, Declarations)
$(TOCENTRY type.html, Types)
$(TOCENTRY property.html, Properties)
$(TOCENTRY attribute.html, Attributes)
$(TOCENTRY pragma.html, Pragmas)
$(TOCENTRY expression.html, Expressions)
$(TOCENTRY statement.html, Statements)
$(TOCENTRY arrays.html, Arrays)
$(TOCENTRY hash-map.html, Associative Arrays)
$(TOCENTRY struct.html, Structs &amp; Unions)
$(TOCENTRY class.html, Classes)
$(TOCENTRY interface.html, Interfaces)
$(TOCENTRY enum.html, Enums)
$(TOCENTRY const3.html, Const and Immutable)
$(TOCENTRY function.html, Functions)
$(TOCENTRY operatoroverloading.html, Operator Overloading)
$(TOCENTRY template.html, Templates)
$(TOCENTRY template-mixin.html, Template Mixins)
$(TOCENTRY dbc.html, Contracts)
$(TOCENTRY version.html, Conditional Compilation)
$(TOCENTRY traits.html, Traits)
$(TOCENTRY errors.html, Handling errors)
$(TOCENTRY unittest.html, Unit Tests)
$(TOCENTRY garbage.html, Garbage Collection)
$(TOCENTRY float.html, Floating Point)
$(TOCENTRY iasm.html, Inline Assembler)
$(TOCENTRY ddoc.html, Documentation Comments)
$(TOCENTRY interfaceToC.html, Interfacing To C)
$(TOCENTRY cpp_interface.html, Interfacing To C++)
$(TOCENTRY portability.html, Portability Guide)
$(TOCENTRY html.html, Embedding D in HTML)
$(TOCENTRY entity.html, Named Character Entities)
$(TOCENTRY memory-safe-d.html, Memory Safe D Spec)
$(TOCENTRY abi.html, Application Binary Interface)
)
SUBNAV_HOWTOS=
$(NAVBLOCK
$(TOCENTRYT windows.html, D implementation for 32 bit Windows systems, D for Win32)
$(TOCENTRYT dll.html, Writing 32 bit Windows DLLs in D, Win32 DLLs in D)
$(TOCENTRYT COM.html, Windows COM Programming, COM Programming)
$(TOCENTRYT htomodule.html, converting C .h header files to D modules, C .h to D Modules)
$(TOCENTRYT http://www.digitalmars.com/techtips/index.html, Programming tips, Tech Tips)
)
SUBNAV_ARTICLES=
$(NAVBLOCK
$(TOCENTRYT d-floating-point.html, D Floating Point, Floating Point)
$(TOCENTRYT migrate-to-shared.html, Migrating to Shared, Migrating to Shared)
$(TOCENTRYT hijack.html, Function Hijacking Mitigation, Hijacking)
$(TOCENTRYT const3.html, Const and Immutable, Const)
$(TOCENTRYT memory.html, Memory management techniques in D, Memory Management)
$(TOCENTRYT exception-safe.html, Exception safe programming techniques, Exception Safety)
$(TOCENTRYT templates-revisited.html, D takes a fresh look at template design, Templates Revisited)
$(TOCENTRYT regular-expression.html, Programming with regular expressions, Regular Expressions)
$(TOCENTRYT lazy-evaluation.html, Lazy evaluation of function arguments, Lazy Evaluation)
$(TOCENTRYT variadic-function-templates.html, Variadic arguments to templates, Variadic Templates)
$(TOCENTRYT tuple.html, What tuples are and how to use them, Tuples)
$(TOCENTRYT mixin.html, String mixins compile string literals into D programs, Mixins)
$(TOCENTRYT safed.html, SafeD - The Safe Subset of D, SafeD)
)
D_S = $(LAYOUT $(NAVIGATION), $1, $(ARGS $+))
SPEC_S = $(LAYOUT $(NAVIGATION), $1, $(ARGS $+))
COMMUNITY= $(LAYOUT $(NAVIGATION), $1, $(ARGS $+))
PDF_COVER= $0
LAYOUT=
<div id="navigation">
$1
$(GOOGLE_TRANSLATE)
</div>
<div id="content">
$(PAGE_TOOLS)
<h1>$2</h1>
$3
$(GOOGLE_FOOTER)
</div>
NAVBLOCK=
<div class="navblock">
$(UL $0)
</div>
NAVBLOCK_HEADER=
<div class="navblock">
$1
$(UL $(ARGS $+))
</div>
TOCHEADER = <h2>$0</h2>
TOCHEADERL = <h2><a href="$1" title="$2">$3</a></h2>
TOCENTRY = $(LI $(LINK2 $1, $2))
TOCENTRYT = $(LI <a href="$1" title="$2">$3</a>)
TOCENTRYH = $(LI $(LINK2 $1, $2)$3)
TOCENTRYTH = $(LI <a href="$1" title="$2">$3</a>$4)
D = $(RED $(B D))
ARGS=$0
RPAREN = )
LPAREN = (
TABLE1 = <table border=1 cellpadding=4 cellspacing=0>$0</table>
TABLE2 = <table border=1 cellpadding=4 cellspacing=0><caption>$1</caption>$+</table>
TH=<th scope="col">$0</th>
BLOCKQUOTE = <blockquote><p>$+</p><cite>$1</cite></blockquote>
BLOCKQUOTE_PLAIN = <blockquote><p>$0</p></blockquote>
TT=<tt>$0</tt>
SUB=<sub>$0</sub>
LNAME2=<a name="$1">$+</a>
SECTION1=<h1>$1</h1>$+
SECTION2=<h2>$1</h2>$+
SECTION3=<h3>$1</h3>$+
SECTION4=<h4>$1</h4>$+
SINGLEQUOTE= &lsquo;$0&rsquo;
DOUBLEQUOTE= &ldquo;$0&rdquo;
NOTRANSLATE=<code>$0</code>
NOTRANSLATE=<span class="notranslate">$0</span>
D_CODE = <pre class="d_code">$(NOTRANSLATE $0)</pre>
D_COMMENT = <span class="d_comment">$0</span>
D_STRING = <span class="d_string">$0</span>
D_KEYWORD = <span class="d_keyword">$0</span>
D_PSYMBOL = <span class="d_psymbol">$0</span>
D_PARAM = <span class="d_param">$0</span>
CODE=<tt>$(NOTRANSLATE $0)</tt>
CCODE=<pre class="ccode">$(NOTRANSLATE $0)</pre>
CPPCODE=<pre class="cppcode">$(NOTRANSLATE $0)</pre>
GRAMMAR=<pre class="bnf">$(NOTRANSLATE $0)</pre>
DDOCCODE=<pre class="ddoccode">$(NOTRANSLATE $0)</pre>
SCINI=<pre class="scini">$(NOTRANSLATE $0)</pre>
CONSOLE=<pre class="console">$(NOTRANSLATE $0)</pre>
MODDEFFILE=<pre class="moddeffile">$(NOTRANSLATE $0)</pre>
NEWS=http://www.digitalmars.com/drn-bin/wwwnews?$1/$+
NEWS=http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=$1&artnum=$+
NEWS=http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=$1&article_id=$+
NEWSGROUP=http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=$0
NG_cpp = <a href="$(NEWS c%2B%2B,$0)">c++/$0</a>
NG_cpp_beta = <a href="$(NEWS c%2B%2B.beta,$0)">c++.beta/$0</a>
NG_cpp_command_line = <a href="$(NEWS c%2B%2B.command-line,$0)">c++.command-line/$0</a>
NG_D = <a href="$(NEWS D.gnu,$0)">D/$0</a>
NG_D_gnu = <a href="$(NEWS D.gnu,$0)">D.gnu/$0</a>
NG_digitalmars_D = <a href="$(NEWS digitalmars.D,$0)">D/$0</a>
NG_digitalmars_D_bugs = <a href="$(NEWS digitalmars.D.bugs,$0)">D.bugs/$0</a>
NG_digitalmars_D_learn = <a href="$(NEWS digitalmars.D.learn,$0)">D.learn/$0</a>
NG_digitalmars_D_announce = <a href="$(NEWS digitalmars.D.announce,$0)">D.announce/$0</a>
NG_DMDScript = <a href="$(NEWS DMDScript,$0)">DMDScript/$0</a>
OPT=<sub>opt</sub>
GLINK=$(LINK2 #$0, $(I $0))
GLINK2=$(LINK2 $1.html#$2, $(I $2))
GNAME=$(LNAME2 $0, $0)
ASSIGNEXPRESSION=$(LINK2 expression.html#AssignExpression, $(I AssignExpression))
ISEXPRESSION=$(LINK2 expression.html#IsExpression, $(I IsExpression))
META_KEYWORDS=D programming language
META_DESCRIPTION=D Programming Language
ACRONYM=<acronym title="$+">$1</acronym> ($+)
SFINAE=$(LINK2 glossary.html#sfinae, $(ACRONYM SFINAE, Substitution Failure Is Not An Error))
COMMA=,
VER=2.0
V1=
V2=$0
DIGG=<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
SLASHDOT=<script src="http://slashdot.org/slashdot-it.js" type="text/javascript"></script>
HOMEIMG=<img src="home.png" border=0 alt="digitalmars.com">
SEARCHIMG=<img src="search.png" border=0 alt="Search">
DOWNLOADIMG=<img src="download.png" border=0 alt="Download">
WIKIIMG=<img src="wiki.png" border=0 alt="D Wiki">
DIMG=<img src="d.png" border=0 alt="D Programming Language">
NEWSIMG=<img src="http://www.digitalmars.com/news.png" border=0 alt="User Forums">
OBJ2ASM=$(LINK2 http://www.digitalmars.com/ctg/obj2asm.html, obj2asm)
DUMPOBJ=$(LINK2 http://www.digitalmars.com/ctg/dumpobj.html, dumpobj)
SHELL=$(LINK2 http://www.digitalmars.com/ctg/shell.html, shell)
PHOBOSSRC=$(LINK2 http://www.dsource.org/projects/phobos/browser/trunk/phobos/$0, $0)
DRUNTIMESRC=$(LINK2 http://www.dsource.org/projects/druntime/browser/trunk/src/$0, $0)
DOLLAR=$
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>
AMAZONLINK= $(LINK2 http://www.amazon.com/exec/obidos/ASIN/$1/classicempire, $+)
FOO=FOO
Jump to Line
Something went wrong with that request. Please try again.