diff -uNr dmd-0.131/dmd/html/d/abi.html dmd-0.132/dmd/html/d/abi.html --- dmd-0.131/dmd/html/d/abi.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/abi.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/acknowledgements.html dmd-0.132/dmd/html/d/acknowledgements.html --- dmd-0.131/dmd/html/d/acknowledgements.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/acknowledgements.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/arrays.html dmd-0.132/dmd/html/d/arrays.html --- dmd-0.131/dmd/html/d/arrays.html 2005-09-09 00:37:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/arrays.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Sep 09 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/attribute.html dmd-0.132/dmd/html/d/attribute.html --- dmd-0.131/dmd/html/d/attribute.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/attribute.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/changelog.html dmd-0.132/dmd/html/d/changelog.html --- dmd-0.131/dmd/html/d/changelog.html 2005-09-09 00:37:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/changelog.html 2005-09-19 15:55:44.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Sep 09 2005 +Last update Mon Sep 19 2005
@@ -115,6 +115,7 @@
+

+ What's New for + D 0.132 +

+ +Sep 19, 2005 +

+ +

New/Changed Features

+ + + +

What's New for D 0.131 diff -uNr dmd-0.131/dmd/html/d/class.html dmd-0.132/dmd/html/d/class.html --- dmd-0.131/dmd/html/d/class.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/class.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005

@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/comparison.html dmd-0.132/dmd/html/d/comparison.html --- dmd-0.131/dmd/html/d/comparison.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/comparison.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -690,6 +690,14 @@ +
Yes Yes +
Documentation comments + Yes + No + No + Yes + Yes +
@@ -852,6 +860,12 @@ can also reference the members and fields of the lexically enclosing class; one can think of it as if it contained a 'this' pointer to the enclosing class. +

+ +

Documentation comments +
Documentation comments refer to a standardized way to produce + documentation from the source code file using specialized + comments. diff -uNr dmd-0.131/dmd/html/d/cppcomplex.html dmd-0.132/dmd/html/d/cppcomplex.html --- dmd-0.131/dmd/html/d/cppcomplex.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/cppcomplex.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/cppdbc.html dmd-0.132/dmd/html/d/cppdbc.html --- dmd-0.131/dmd/html/d/cppdbc.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/cppdbc.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/cppstrings.html dmd-0.132/dmd/html/d/cppstrings.html --- dmd-0.131/dmd/html/d/cppstrings.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/cppstrings.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/cpptod.html dmd-0.132/dmd/html/d/cpptod.html --- dmd-0.131/dmd/html/d/cpptod.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/cpptod.html 2005-09-18 11:39:22.000000000 +0200 @@ -46,7 +46,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/ctod.html dmd-0.132/dmd/html/d/ctod.html --- dmd-0.131/dmd/html/d/ctod.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/ctod.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/dbc.html dmd-0.132/dmd/html/d/dbc.html --- dmd-0.131/dmd/html/d/dbc.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/dbc.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/dcompiler.html dmd-0.132/dmd/html/d/dcompiler.html --- dmd-0.131/dmd/html/d/dcompiler.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/dcompiler.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -233,8 +233,19 @@
.res resource file
+
-c
-
compile only, do not link +
compile only, do not link
+ +
-D
+
generate documentation
+ +
-Dddocdir
+
write documentation file to docdir directory
+ +
-Dffilename
+
write documentation file to filename
+
-d
allow deprecated features
-debug
@@ -472,8 +483,19 @@ Library files to link in +
-c
-
compile only, do not link +
compile only, do not link
+ +
-D
+
generate documentation
+ +
-Dddocdir
+
write documentation file to docdir directory
+ +
-Dffilename
+
write documentation file to filename
+
-d
allow deprecated features
-debug
diff -uNr dmd-0.131/dmd/html/d/ddoc.html dmd-0.132/dmd/html/d/ddoc.html --- dmd-0.131/dmd/html/d/ddoc.html 1970-01-01 01:00:00.000000000 +0100 +++ dmd-0.132/dmd/html/d/ddoc.html 2005-09-19 15:55:44.000000000 +0200 @@ -0,0 +1,675 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Digital Mars - The D Programming Language - EmbeddedDocumentation + + + + +www.digitalmars.com + +Home +| Search +| D +| Comments + +
+Last update Mon Sep 19 2005 +
+ + + +
+
+
+ + + + + +
+D
+Language
+Phobos
+Comparisons +
+
+ + · Overview
+ · D for Win32
+ · Win32 DLLs in D
+ · C .h to D Modules
+ · FAQ
+ · Style Guide
+ · Example: wc
+ · Future
+ · D Change Log
+ · Tech Tips
+ · Glossary
+ · Acknowledgements
+
+ Tools +
+ · DMD D Compiler
+ · GDC D Compiler
+ · Linker
+ · Profiler
+
+ Community +
+ · News Digest
+ · News
+ · Forum
+ · Announcements
+ · Learn
+ · D links
+
+ Archives +
+ · digitalmars.D
+ · digitalmars.D.dtl
+ · digitalmars.D.announce
+ · digitalmars.D.learn
+ · digitalmars.D.bugs
+ · D.gnu
+ · Old D
+
+
+
+ + +

Embedded Documentation

+ + +The D programming language enables embedding both contracts and test +code along side the actual code, which helps to keep them all +consistent with each other. One thing lacking is the documentation, +as ordinary comments are usually unsuitable for automated extraction +and formatting into manual pages. +Embedding the user documentation into the source code has important +advantages, such as not having to write the documentation twice, and +the likelihood of the documentation staying consistent with the code. +

+ +Some existing approaches to this are: + +

+ +D's goals for embedded documentation are: + +
    +
  1. It looks good as embedded documentation, not just after it + is extracted and processed. +
  2. It's easy and natural to write, + i.e. minimal reliance on <tags> and other clumsy forms one + would never see in a finished document. +
  3. It does not repeat information that the compiler already + knows from parsing the code. +
  4. It doesn't rely on embedded HTML, as such will impede + extraction and formatting for other purposes. +
  5. It's based on existing D comment forms, so it + is completely independent of parsers only interested in D code. +
  6. It should look and feel different from code, so it won't + be visually confused with code. +
  7. It should be possible for the user to use Doxygen or other + documentation extractor if desired. +
+ +

Specification

+ +The specification for the form of embedded documentation comments only +specifies how information is to be presented to the compiler. +It is implementation-defined how that information is used and the form +of the final presentation. Whether the final presentation form is an +HTML web page, a man page, a PDF file, etc. is not specified as part of the +D Programming Language. +

+ +

Phases of Processing

+ +Embedded documentation comments are processed in a series of phases: + +
    +
  1. Lexical - documentation comments are identified and attached + to tokens. +
  2. Parsing - documentation comments are associated with + specific declarations and combined. +
  3. Sections - each documentation comment is divided up into + a sequence of sections. +
  4. Special sections are processed. +
  5. Highlighting of non-special sections is done. +
  6. All sections for the module are combined. +
  7. Macro text substitution is performed to produce the final result. +
+ + + +

Lexical

+ +Embedded documentation comments are one of the following forms: + +
    +
  1. /** ... */ The two *'s after the opening / +
  2. /++ ... +/ The two +'s after the opening / +
  3. /// The three slashes +
+ +The following are all embedded documentation comments: + +
+/// This is a one line documentation comment.
+
+/** So is this. */
+
+/++ And this. +/
+
+/**
+   This is a brief documentation comment.
+ */
+
+/**
+ * The leading * on this line is not part of the documentation comment.
+ */
+
+/*********************************
+   The extra *'s immediately following the /** are not
+   part of the documentation comment.
+ */
+
+/++
+   This is a brief documentation comment.
+ +/
+
+/++
+ + The leading + on this line is not part of the documentation comment.
+ +/
+
+/+++++++++++++++++++++++++++++++++
+   The extra +'s immediately following the /++ are not
+   part of the documentation comment.
+ +/
+
+
+ +The extra *'s and +'s on the comment opening and left margin are ignored +and are not part +of the embedded documentation. +Comments not following one of those forms are not documentation comments. + + +

Parsing

+ +Each documentation comment is associated with a declaration. +If the documentation comment is on a line by itself or with only whitespace +to the left, it refers to the next +declaration. +Multiple documentation comments applying to the same declaration +are concatenated. +Documentation comments not associated with a declaration are ignored. +Documentation comments preceding the ModuleDeclaration apply to the +entire module. +If the documentation comment appears on the same line to the right of a +declaration, it applies to that. +

+ +If a documentation comment for a declaration consists only of the +identifier ditto +then the documentation comment for the previous declaration at the same +declaration scope is applied to this declaration as well. +

+ +If there is no documentation comment for a declaration, that declaration +may not appear in the output. To ensure it does appear in the output, +put an empty declaration comment for it. + +

+int a;  /// documentation for a; b has no documentation
+int b;
+
+/** documentation for c and d */
+/** more documentation for c and d */
+int c;
+/** ditto */
+int d;
+
+/** documentation for e and f */ int e;
+int f;	/// ditto
+
+/** documentation for g */
+int g; /// more documentation for g
+
+/// documentation for C and D
+class C
+{
+    int x;    /// documentation for C.x
+
+    /** documentation for C.y and C.z */
+    int y;
+    int z;    /// ditto
+}
+
+/// ditto
+class D
+{
+}
+
+ + + +

Sections

+ +The document comment is a series of Sections. +A Section is a name that is the first non-blank character on +a line immediately followed by a ':'. This name forms the section name. +The section name is not case sensitive. +

+ +

Summary

+ +The first section is the Summary, and does not have a section name. +It is first paragraph, up to a blank line or a section name. +While the summary can be any length, try to keep it to one line. +The Summary section is optional. + +

Synopsis

+ +The next unnamed section is the Synopsis. +It consists of all the paragraphs following the Summary until +a section name is encountered or the end of the comment. +

+ +While the Synopsis section is optional, +there cannot be a Synopsis without a Summary section. + + +

+/***********************************
+ * Brief summary of what
+ * myfunc does, forming the summary section.
+ *
+ * First paragraph of synopsis description.
+ *
+ * Second paragraph of
+ * synopsis description.
+ */
+
+void myfunc() { }
+
+ +Named sections follow the Summary and Synopsis unnamed sections. + + + +

Standard Sections

+ +For consistency and predictability, there are several standard sections. +None of these are required to be present. + +
+ +
Author: +
Lists the author(s) of the declaration. +
+/**
+ * Author: Melvin D. Nerd
+ */
+
+ +
Version: +
Specifies the version of the declaration. +
+/**
+ * Version: 1.6a
+ */
+
+ +
Deprecated: +
Provides an explanation for and corrective action to take if the associated + declaration is marked as deprecated. + +
+/**
+ * Deprecated: superseded by function bar().
+ */
+
+deprecated void foo() { ... }
+
+ +
License: +
Any license information for copyrighted code. +
+/**
+ * License: use freely for any purpose
+ */
+
+void bar() { ... }
+
+ +
Date: +
Specifies the date of the last revision. The date should be in a form + parseable by std.date. + +
+/**
+ * Date: March 14, 2003
+ */
+
+ +
Returns: +
Explains the return value of the function. + If the function returns void, don't redundantly document it. +
+/**
+ * Read the file.
+ * Returns: The contents of the file.
+ */
+
+void[] readFile(char[] filename) { ... }
+
+ +
Throws: +
Lists exceptions thrown and under what circumstances they are thrown. +
+/**
+ * Write the file.
+ * Throws: WriteException on failure.
+ */
+
+void writeFile(char[] filename) { ... }
+
+ +
References: +
List of other symbols and URL's to related items. +
+/**
+ * References:
+ *    foo, bar, http://www.digitalmars.com/d/phobos/index.html
+ */
+
+ +
+ + + +

Special Sections

+ +Some sections have specialized meanings and syntax. + +
+ +
Params: +
Function parameters can be documented by listing them in a params + section. Each line that starts with an identifier followed by + an '=' starts a new parameter description. A description can + span multiple lines. + +
+/***********************************
+ * foo does this.
+ * Params:
+ *	x =	is for this
+ *		and not for that
+ *	y =	is for that
+ */
+
+void foo(int x, int y)
+{
+}
+
+ +
Copyright: +
This contains the copyright notice. The macro COPYRIGHT is set to + the contents of the section. + The COPYRIGHT macro is often expanded in the boilerplate section. + The copyright section only gets this special treatment when it + is for the module declaration. + +
+/** Copyright: Public Domain */
+
+module foo;
+
+ +
Boilerplate: +
The boilerplate section enables complete control over how the generated + documentation is inserted into a boilerplate document. + The documentation created is set as the replacement text for the + BODY macro. + Boilerplate sections only matter for the module declaration. + +
+/**
+ * Boilerplate:
+ *	<html>
+ *	<title>$(TITLE)</title>
+ *	<body>
+ *	<h1>$(TITLE)</h1>
+ *	$(BODY)
+ *	<hr>
+ *	Last update: $(DATETIME)
+ *	$(COPYRIGHT)
+ *	</body>
+ *	</html>
+ */
+
+module bar;
+
+ +
Macros:
+
The macros section follows the same syntax as the Params: section. + It's a series of NAME=value pairs. + The NAME is the macro name, and value is the replacement + text. +
+/**
+ * Macros:
+ *	FOO =	now is the time for
+ *		all good men
+ *	BAR =	bar
+ */
+
+ +
+ + +

Macros

+ + The documentation comment processor includes a simple macro + text preprocessor. There are predefined macros, and macros + defined by the Macros: section. + When a appears + in section text it is replaced with NAME's corresponding + replacment text. + The replacement text is then recursively scanned for more macros. + If a macro is recursively encountered, only one level of recursion + is performed. + Macro invocations that cut across replacement text boundaries are + not expanded. + If NAME is not a macro name, it is assumed to be a file name, + and the contents of the file with that name become the replacement + text. (By convention, non-filename macro names are in all upper case, + and filenames are not.) + If the file does not exist, the replacement text has no characters + in it. + If a is desired to exist in the output without being macro + expanded, add an extra $ as in: $(NAME). The extra $ will be elided. + +

Predefined Macros

+ + + + + + + +
BODY + The generated document text before it is inserted into the + boilerplate text. +
TITLE + Set to the module name. +
DATETIME + Set to the current date and time. +
YEAR + Set to the current year. +
COPYRIGHT + Set to the contents of any Copyright: section that is part + of the module comment. +
+ + +

Highlighting

+ + + +

Embedded Comments

+ + The documentation comments can themselves be commented using + the <!-- comment text --> syntax. These comments do not + nest. + +

Embedded Code

+ + D code can be embedded using lines with at least three -'s in + them to delinate the code section: + +
+/++++++++++++++++++++++++
+ + Our function.
+ + Example:
+ + --------------------------
+ +  #include <stdio.h>
+ +
+ +  void foo()
+ +  {
+ +	printf("foo!\n");  /* print the string */
+ +  }
+ + --------------------------
+ +/
+
+ + Note that documentation comment uses the /++ ... +/ form + so that /* ... */ can be used inside the code section. + +

Embedded HTML

+ +HTML can be embedded into the documentation comments, and it will +be passed through to the HTML output unchanged. +However, since it is not necessarily true that HTML will be the desired +output format of the embedded documentation comment extractor, it is +best to avoid using it where practical. + +
+/** Example of embedded HTML:
+ *   <ol>
+ *      <li> <a href="www.digitalmars.com">Digital Mars</a>
+ *      <li> <a href="www.classicempire.com">Empire</a>
+ *   </ol>
+ */
+
+ + +

Emphasis

+ +Identifiers in documentation comments that are function parameters or are +names that are in scope at the associated declaration are emphasized in +the output. +This emphasis can take the form of italics, boldface, a hyperlink, etc. +How it is emphasized depends on what it is - a function parameter, type, +D keyword, etc. +To prevent unintended emphasis of an identifier, it can be preceded by +an underscore (_). The underscore will be stripped from the output. + + +

Character Entities

+ + Because the characters <, > and & have special meaning + to the documentation processor, to avoid confusion it can be best + to replace them with their corresponding character entities: + + + + + + +
Character Entity
< &lt;
> &gt;
& &amp;
+ + It is not necessary to do this inside a code section, or if the + special character is not immediately followed by a # or a letter. +
+

Feedback and Comments

+ +

Add feedback and comments regarding this + page.

+ + + + + + + + + + + + + diff -uNr dmd-0.131/dmd/html/d/declaration.html dmd-0.132/dmd/html/d/declaration.html --- dmd-0.131/dmd/html/d/declaration.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/declaration.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/dlinks.html dmd-0.132/dmd/html/d/dlinks.html --- dmd-0.131/dmd/html/d/dlinks.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/dlinks.html 2005-09-18 11:39:22.000000000 +0200 @@ -47,7 +47,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -249,6 +249,9 @@
diff -uNr dmd-0.131/dmd/html/d/doc.html dmd-0.132/dmd/html/d/doc.html --- dmd-0.131/dmd/html/d/doc.html 2005-09-06 16:50:56.000000000 +0200 +++ dmd-0.132/dmd/html/d/doc.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,543 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Digital Mars - The D Programming Language - EmbeddedDocumentation - - - - -www.digitalmars.com - -Home -| Search -| D -| Comments - -
-Last update Tue Sep 06 2005 -
-
- - -
-
-
- - - - - -
-D
-Language
-Phobos
-Comparisons -
-
- - · Overview
- · D for Win32
- · Win32 DLLs in D
- · C .h to D Modules
- · FAQ
- · Style Guide
- · Example: wc
- · Future
- · D Change Log
- · Tech Tips
- · Glossary
- · Acknowledgements
-
- Tools -
- · DMD D Compiler
- · GDC D Compiler
- · Linker
- · Profiler
-
- Community -
- · News Digest
- · News
- · Forum
- · Announcements
- · Learn
- · D links
-
- Archives -
- · digitalmars.D
- · digitalmars.D.dtl
- · digitalmars.D.announce
- · digitalmars.D.learn
- · digitalmars.D.bugs
- · D.gnu
- · Old D
-
-
-
- - -

Embedded Documentation

- - -The D programming language enables embedding both contracts and test -code along side the actual code, which helps to keep them all -consistent with each other. One thing lacking is the documentation, -as ordinary comments are usually unsuitable for automated extraction -and formatting into manual pages. -Embedding the user documentation into the source code has important -advantages, such as not having to write the documentation twice, and -the likelihood of the documentation staying consistent with the code. -

- -Some existing approaches to this are: - -

- -D's goals for embedded documentation are: - -
    -
  1. It looks good as embedded documentation, not just after it - is extracted and processed. -
  2. It's easy and natural to write, - i.e. minimal reliance on <tags> and other clumsy forms one - would never see in a finished document. -
  3. It does not repeat information that the compiler already - knows from parsing the code. -
  4. It doesn't rely on embedded HTML, as such will impede - extraction and formatting for other purposes. -
  5. It's based on existing D comment forms, so it - is completely independent of parsers only interested in D code. -
  6. It should look at feel different from code, so it won't - be visually confused with code. -
  7. It should be possible for the user to use Doxygen or other - documentation extractor if desired. -
- -

Specification

- -Note: This is not implemented, it's just a proposal. -

- -Embedded documentation comments are one of the following forms: - -

    -
  1. /** ... */ The two *'s after the opening / -
  2. /++ ... +/ The two +'s after the opening / -
  3. /// The three slashes -
- -The following are all embedded documentation comments: - -
-/// This is a one line documentation comment.
-
-/** So is this. */
-
-/++ And this. +/
-
-/**
-   This is a brief documentation comment.
- */
-
-/**
- * The leading * on this line is not part of the documentation comment.
- */
-
-/*********************************
-   The extra *'s immediately following the /** are not
-   part of the documentation comment.
- */
-
-/++
-   This is a brief documentation comment.
- +/
-
-/++
- + The leading + on this line is not part of the documentation comment.
- +/
-
-/+++++++++++++++++++++++++++++++++
-   The extra +'s immediately following the /++ are not
-   part of the documentation comment.
- +/
-
-
- -The extra *'s and +'s on the comment opening and left margin are ignored -and are not part -of the embedded documentation. -Comments not following one of those forms are not documentation comments. -

- -Each documentation comment is associated with a declaration. -If the documentation comment is on a line by itself or with only whitespace -to the left, it refers to the next -declaration. -Multiple documentation comments with no intervening declarations -are concatenated. -Documentation comments preceding the ModuleDeclaration apply to the -entire module. -If the documentation comment appears on the same line to the right of a -declaration, it applies to that. -A documentation comment before the ModuleDeclaration applies to the -entire module. - -If a documentation comment for a declaration consists only of the -identifier ditto -then the documentation comment for the previous declaration at the same -scope is applied to this declaration as well. - - -

-int a;  /// documentation for a; b has no documentation
-int b;
-
-/** documentation for c and d */
-/** more documentation for c and d */
-int c;
-/** ditto */
-int d;
-
-/** documentation for e and f */ int e;
-int f;	/// ditto
-
-/// documentation for C and D
-class C
-{
-    int x;    /// documentation for C.x
-
-    /** documentation for C.y and C.z */
-    int y;
-    int z;    /// ditto
-}
-
-/// ditto
-class D
-{
-}
-
- - - -

Basic Structure

- -The first paragraph, up to a blank line or a Section, -of a documentation comment forms the -summary line. Summary lines should be short. -Subsequent paragraphs form the more detailed description. -Paragraphs are delineated by blank lines or Sections. - -
-/***********************************
- * Brief summary of what
- * myfunc does.
- *
- * First paragraph of fuller description.
- *
- * Second paragraph of
- * fuller description.
- */
-
-void myfunc() { }
-
- -Function parameters can be documented by associating a comment with each -parameter: - -
-/***********************************
- * foo does this.
- */
-
-void foo(
-	int x,  /// is for this
-	int y   /// is for that
-	)
-{
-}
-
- - -

Hyperlinks

- -Hyperlinks and email addresses can just be inserted as is, the documentation -extractor will convert them into HTML hyperlinks as necessary: - -
-/** For more information mail to foo@bar.com or look
-    at the website http://www.bar.com.
-  */
-
- - -

Embedded HTML

- -HTML can be embedded into the documentation comments, and it will -be passed through to the HTML output unchanged. -However, since it is not necessarily true that HTML will be the desired -output format of the embedded documentation comment extractor, it is -best to avoid using it where practical. - -
-/** Example of embedded HTML:
- *   <ol>
- *      <li> <a href="www.digitalmars.com">Digital Mars</a>
- *      <li> <a href="www.classicempire.com">Empire</a>
- *   </ol>
- */
-
- - -

Emphasis

- -Identifiers in documentation comments that are function parameters or are -names that are in scope at the associated declaration are emphasized in -the output. -This emphasis can take the form of italics, boldface, a hyperlink, etc. -How it is emphasized depends on what it is - a function parameter, type, -D keyword, etc. -To prevent unintended emphasis of an identifier, it can be preceded by -an underscore (_). The underscore will be stripped from the output. - -

Sections

- -Additional, more specific information can be delineated with Sections. -Sections start with an identifier being the first non-whitespace on a -line, immediately followed by a colon ":". -They are optional and case-insensitive. -The section continues until either the end of the documentation comment -or another section. -Unrecognized sections are passed through to the output unchanged. - -

Author:

- -Specifies the name of the author. - -
-/**
- * Author: Melvin D. Nerd
- */
-
- - -

Code:

- -Used for embedding example D code. Because D code can contain comments, -the /++ ... +/ should probably be the documentation comment used for -code sections. - -
-/+++++++++++++++++++++++++
- + Code:
- +	int func()
- +	{
- +	    return 3;   /* the value */
- +	}
- +/
-
- - -

Date:

- -Specifies the date of the last revision. The date should be in a form -parseable by std.date. - -
-/**
- * Date: March 14, 2003
- */
-
- - -

Deprecated:

- -Provides an explanation for and corrective action to take if the associated -declaration is marked as deprecated. - -
-/**
- * Deprecated: superseded by function bar().
- */
-
-deprecated void foo() { ... }
-
- - -

Include:

- -Specifies a file to be inserted verbatim into the output -of the documentation processor. The file can contain additional documentation, -or things like boilerplate. - -
-/**
- * Include: boilerplate.txt
- */
-
- - -

License:

- -Specifies the license. - -

Keywords:

- -Keywords are added to the list of identifiers to be emphasized. -They only apply to the current documentation comments or to -documentation comments nested within the scope of the associated declaration. - -
-/**
- * This cow will be emphasized.
- * Keywords: fread, fwrite, cow
- */
-class A
-{
-    /** A, x and cow will be emphasized */
-    int x;
-}
-
-/**
- * This cow won't be emphasized.
- */
-class B { }
-
- - -

Params:

- -This is an alternate method of documenting a function's parameters. -The first identifier of each subsequent line is taken to be a parameter name, -followed by its description. Multiple description lines are lined up with -the start of the first description line. - -
-/** This is my function.
- * Params:
- *     fp    File pointer
- *     name  File name and
- *           more.
- */
-
-void foo(FILE *fp, char[] name)
-{
-    ..
-}
-
- - -

Returns:

- -Explains the return value of the function. -If the function returns void, don't redundantly document it. - -
-/**
- * Read the file.
- * Returns: The contents of the file.
- */
-
-void[] readFile(char[] filename) { ... }
-
- - -

URL:

- -In order for hyperlinks to symbols outside of the current module, -the documentation extractor must know the URL where they will be -located. The URL section is a list of pairs of module names and URL -prefixes. - -
-import std.string;
-/**
- * Thid identifier toupper will be replaced by a hyperlink to
- * http://www.digitalmars.com/d/phobos/std_string.html#toupper.
- *
- * URL:
- *    std.string  http://www.digitalmars.com/d/phobos/std_string.html
- */
-
- - -

Version:

- -Specifies the version. - -
-/**
- * Version: 1.6a
- */
-
- - - -
-

Feedback and Comments

- -

Add feedback and comments regarding this - page.

- - - - - - - - - - - - - diff -uNr dmd-0.131/dmd/html/d/dstyle.html dmd-0.132/dmd/html/d/dstyle.html --- dmd-0.131/dmd/html/d/dstyle.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/dstyle.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/entity.html dmd-0.132/dmd/html/d/entity.html --- dmd-0.131/dmd/html/d/entity.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/entity.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/enum.html dmd-0.132/dmd/html/d/enum.html --- dmd-0.131/dmd/html/d/enum.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/enum.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/errors.html dmd-0.132/dmd/html/d/errors.html --- dmd-0.131/dmd/html/d/errors.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/errors.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/expression.html dmd-0.132/dmd/html/d/expression.html --- dmd-0.131/dmd/html/d/expression.html 2005-08-28 21:46:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/expression.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Sun Aug 28 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/faq.html dmd-0.132/dmd/html/d/faq.html --- dmd-0.131/dmd/html/d/faq.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/faq.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/float.html dmd-0.132/dmd/html/d/float.html --- dmd-0.131/dmd/html/d/float.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/float.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/function.html dmd-0.132/dmd/html/d/function.html --- dmd-0.131/dmd/html/d/function.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/function.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/future.html dmd-0.132/dmd/html/d/future.html --- dmd-0.131/dmd/html/d/future.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/future.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/garbage.html dmd-0.132/dmd/html/d/garbage.html --- dmd-0.131/dmd/html/d/garbage.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/garbage.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/glossary.html dmd-0.132/dmd/html/d/glossary.html --- dmd-0.131/dmd/html/d/glossary.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/glossary.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
diff -uNr dmd-0.131/dmd/html/d/html.html dmd-0.132/dmd/html/d/html.html --- dmd-0.131/dmd/html/d/html.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/html.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/htomodule.html dmd-0.132/dmd/html/d/htomodule.html --- dmd-0.131/dmd/html/d/htomodule.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/htomodule.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -273,6 +273,48 @@ int MAX(int a, int b) { return (a < b) ? b : a); } + + + The functions, however, won't work if they appear inside static + initializers that must be evaluated at compile time rather than + runtime. To do it at compile time, a template can be used: + +
+#define GT_DEPTH_SHIFT  (0)
+#define GT_SIZE_SHIFT   (8)
+#define GT_SCHEME_SHIFT (24)
+#define GT_DEPTH_MASK   (0xffU << GT_DEPTH_SHIFT)
+#define GT_TEXT         ((0x01) << GT_SCHEME_SHIFT)
+
+/* Macro that constructs a graphtype */
+#define GT_CONSTRUCT(depth,scheme,size) 
+	((depth) | (scheme) | ((size) << GT_SIZE_SHIFT))
+
+/* Common graphtypes */
+#define GT_TEXT16  GT_CONSTRUCT(4, GT_TEXT, 16)
+	
+ + The corresponding D version would be: + +
+const uint GT_DEPTH_SHIFT  = 0;
+const uint GT_SIZE_SHIFT   = 8;
+const uint GT_SCHEME_SHIFT = 24;
+const uint GT_DEPTH_MASK   = 0xffU << GT_DEPTH_SHIFT;
+const uint GT_TEXT         = 0x01 << GT_SCHEME_SHIFT;
+
+// Template that constructs a graphtype
+template GT_CONSTRUCT(uint depth, uint scheme, uint size)
+{
+ // notice the name of the const is the same as that of the template
+ const uint GT_CONSTRUCT = (depth | scheme | (size << GT_SIZE_SHIFT));
+}
+
+// Common graphtypes
+const uint GT_TEXT16 = GT_CONSTRUCT!(4, GT_TEXT, 16);
+	
+ +

Declaration Lists

D doesn't allow declaration lists to change the type. diff -uNr dmd-0.131/dmd/html/d/iasm.html dmd-0.132/dmd/html/d/iasm.html --- dmd-0.131/dmd/html/d/iasm.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/iasm.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/interface.html dmd-0.132/dmd/html/d/interface.html --- dmd-0.131/dmd/html/d/interface.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/interface.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/interfaceToC.html dmd-0.132/dmd/html/d/interfaceToC.html --- dmd-0.131/dmd/html/d/interfaceToC.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/interfaceToC.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/lex.html dmd-0.132/dmd/html/d/lex.html --- dmd-0.131/dmd/html/d/lex.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/lex.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/memory.html dmd-0.132/dmd/html/d/memory.html --- dmd-0.131/dmd/html/d/memory.html 2005-08-28 21:46:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/memory.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Sun Aug 28 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/mixin.html dmd-0.132/dmd/html/d/mixin.html --- dmd-0.131/dmd/html/d/mixin.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/mixin.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/module.html dmd-0.132/dmd/html/d/module.html --- dmd-0.131/dmd/html/d/module.html 2005-08-28 21:46:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/module.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Sun Aug 28 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/operatoroverloading.html dmd-0.132/dmd/html/d/operatoroverloading.html --- dmd-0.131/dmd/html/d/operatoroverloading.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/operatoroverloading.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
@@ -91,6 +91,7 @@ · Memory Management
· Floating Point
· Inline Assembler
Documentation Comments
· Interfacing To C
· Portability Guide
· Embedding D in HTML
diff -uNr dmd-0.131/dmd/html/d/overview.html dmd-0.132/dmd/html/d/overview.html --- dmd-0.131/dmd/html/d/overview.html 2005-08-28 21:46:34.000000000 +0200 +++ dmd-0.132/dmd/html/d/overview.html 2005-09-18 17:27:14.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
-Last update Sun Aug 28 2005 +Last update Sun Sep 18 2005
@@ -232,6 +232,8 @@
  • Incorporate Contract Programming and unit testing methodology.
  • Be able to build lightweight, standalone programs. + +
  • Reduce the costs of creating documentation. @@ -614,6 +616,37 @@ bit[] foo; +

    Documentation

    + + Documentation has traditionally been done twice - first there + are comments documenting what a function does, and then this gets + rewritten into a separate html or man page. + And naturally, over time, they'll tend to diverge as the code + gets updated and the separate documentation doesn't. + Being able to generate the requisite polished documentation directly + from the comments embedded in the source will not only cut the time + in half needed to prepare documentation, it will make it much easier + to keep the documentation in sync with the code. +

    + + Although third party tools exist to do this for C++, they have some + serious shortcomings: +

    +

    Functions

    D has the expected support for ordinary functions including diff -uNr dmd-0.131/dmd/html/d/phobos/std_math.html dmd-0.132/dmd/html/d/phobos/std_math.html --- dmd-0.131/dmd/html/d/phobos/std_math.html 2005-08-22 22:42:58.000000000 +0200 +++ dmd-0.132/dmd/html/d/phobos/std_math.html 2005-09-19 17:53:32.000000000 +0200 @@ -1,472 +1,544 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Digital Mars - The D Programming Language - std.math - - - - -www.digitalmars.com - -Home -| Search -| D -| Comments - -
    -Last update Mon Aug 22 2005 -
    -
  • - - -
    -
    -
    - - - - - -
    -
    -
    D
    -
    Language
    -
    Phobos
    -
    Comparisons


    - -object
    -
    - -std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    -
    -std.windows
    -
    -std.linux
    -
    -std.c
    std.c.stdio
    -
    -std.c.windows
    -
    -std.c.linux
    -
    -
    -
    - - -

    std.math

    - -
    - -
    const real PI -
    const real LOG2 -
    const real LN2 -
    const real LOG2T -
    const real LOG2E -
    const real E -
    const real LOG10E -
    const real LN10 -
    const real PI_2 -
    const real PI_4 -
    const real M_1_PI -
    const real M_2_PI -
    const real M_2_SQRTPI -
    const real SQRT2 -
    const real SQRT1_2 -
    Math constants. -

    - -

    real acos(real) -
    real asin(real) -
    real atan(real) -
    real atan2(real, real) -

    - -

    real cos(real x) -
    Compute cosine of x. x is in radians.
    - Special values: - + + + + + + + +Digital Mars - The D Programming Language - std.math + + + + +www.digitalmars.com + +Home +| Search +| D +| Comments + +
    +Last update Mon Sep 19 17:53:31 2005 + +
    +
    + + +
    +
    +
    + + + + + +
    +
    +
    D
    +
    Language
    +
    Phobos
    +
    Comparisons


    + +object
    +
    + +std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    +
    +std.windows
    +
    +std.linux
    +
    +std.c
    std.c.stdio
    +
    +std.c.windows
    +
    +std.c.linux
    +
    +
    +
    + + +

    std.math

    + +
    + +

    +
    +
    const real E; +
    +
    +

    e +

    +
    +
    const real LOG2T; +
    +
    +

    log210 +

    +
    +
    const real LOG2E; +
    +
    +

    log2e +

    +
    +
    const real LOG2; +
    +
    +

    log102 +

    +
    +
    const real LOG10E; +
    +
    +

    log10e +

    +
    +
    const real LN2; +
    +
    +

    ln 2 +

    +
    +
    const real LN10; +
    +
    +

    ln 10 +

    +
    +
    const real PI; +
    +
    +

    π +

    +
    +
    const real PI_2; +
    +
    +

    π / 2 +

    +
    +
    const real PI_4; +
    +
    +

    π / 4 +

    +
    +
    const real M_1_PI; +
    +
    +

    1 / π +

    +
    +
    const real M_2_PI; +
    +
    +

    2 / π +

    +
    +
    const real M_2_SQRTPI; +
    +
    +

    2 / √π +

    +
    +
    const real SQRT2; +
    +
    +

    √2 +

    +
    +
    const real SQRT1_2; +
    +
    +

    √½ +

    +
    +
    real cos(real x); +
    +
    +

    Returns cosine of x. x is in radians. +

    +

    + +
    Special Values
    x cos(x) invalid? +
    NAN NAN yes +
    ±∞ NAN yes +
    + +

    +
    +
    real sin(real x); +
    +
    +

    Returns sine of x. x is in radians. +

    +

    + +
    Special Values
    x sin(x) invalid? +
    NAN NAN yes +
    ±0.0 ±0.0 no +
    ±∞ NAN yes +
    + +

    +
    +
    real tan(real x); +
    +
    +

    Returns tangent of x. x is in radians. +

    +

    + +
    Special Values
    x tan(x) invalid? +
    NAN NAN yes +
    ±0.0 ±0.0 no +
    ±∞ NAN yes +
    + +

    +
    +
    real ldexp(real n,int exp); +
    +
    +

    Compute n * 2exp +

    +

    References:

    frexp + +

    +
    +
    float sqrt(float x); +
    double sqrt(double x); +
    real sqrt(real x); +
    +
    +

    Compute square root of x. +

    +

    + + + - - + +
    Special Values
    x sqrt(x) invalid?
    x - return value - invalid? -
    ±∞ - NAN - yes + -0.0 -0.0 no +
    <0.0 NAN yes +
    +∞ +∞ no
    -

    - -

    real sin(real x) -
    Compute sine of x. x is in radians.
    - Special values: + +

    +
    +
    real cbrt(real x); +
    +
    +

    Cube root. + +

    +
    +
    real expm1(real x); +
    +
    +

    Calculates the value of the natural logarithm base (e) + raised to the power of x, minus 1. +

    +

    For very small x, expm1(x) is more accurate + than exp(x)-1. +

    +

    + +
    Special Values
    x ex-1 +
    ±0.0 ±0.0 +
    +∞ +∞ +
    -∞ -1.0 +
    + +

    +
    +
    real log(real x); +
    +
    +

    Calculate the natural logarithm of x. +

    +

    + - - - + + +
    Special Values
    x - return value - invalid? -
    ±0.0 - ±0.0 - no -
    ±∞ - NAN - yes + x log(x) divide by 0? invalid? +
    ±0.0 -∞ yes no +
    < 0.0 NAN no yes +
    +∞ +∞ no no
    -

    - -

    real tan(real x) -
    Compute tangent of x. x is in radians.
    - Special values: - + +

    + +
    real log10(real x); +
    +
    +

    Calculate the base-10 logarithm of x. +

    +

    + - - - + + +
    Special Values
    x - return value - invalid? -
    ±0.0 - ±0.0 - no -
    ±∞ - NAN - yes + x log10(x) divide by 0? invalid? +
    ±0.0 -∞ yes no +
    < 0.0 NAN no yes +
    +∞ +∞ no no
    -

    - -

    real cosh(real) -
    real sinh(real) -
    real tanh(real) -
    real exp(real) -

    - -

    real frexp(real value, out int exp) -
    Calculate and return x and exp such that:
    - value=x*2exp
    - .5 <= |x| < 1.0
    - x has same sign as value. -
    - Special values: + +

    +
    +
    real log1p(real x); +
    +
    +

    Calculates the natural logarithm of 1 + x. +

    +

    For very small x, log1p(x) will be more accurate than + log(1 + x). +

    +

    + - - - - -
    Special Values
    value x exp + x log1p(x) divide by 0? invalid?
    ±0.0 ±0.0 0 + ±0.0 ±0.0 no no
    +∞ +∞ int.max + -1.0 -∞ yes no
    -∞ -∞ int.min + <-1.0 NAN no yes
    ±NAN ±NAN int.min + +∞ -∞ no no
    -

    - -

    real ldexp(real n, int exp) -
    Compute n * 2exp -

    - -

    real log(real x) -
    Calculate the natural logarithm of x. -
    - Special values: + +

    +
    +
    int isnan(real e); +
    +
    +

    Is number a nan? + +

    +
    +
    int isfinite(real e); +
    +
    +

    Is number finite? + +

    +
    +
    int isnormal(float f); +
    int isnormal(double d); +
    int isnormal(real e); +
    +
    +

    Is number normalized? + +

    +
    +
    int issubnormal(float f); +
    int issubnormal(double d); +
    int issubnormal(real e); +
    +
    +

    Is number subnormal? (Also called "denormal".) + Subnormals have a 0 exponent and a 0 most significant mantissa bit. + +

    +
    +
    int isinf(real e); +
    +
    +

    Is number infinity? + +

    +
    +
    int signbit(real e); +
    +
    +

    Get sign bit. + +

    +
    +
    real copysign(real to,real from); +
    +
    +

    Copy sign. + +

    +
    +
    real hypot(real x,real y); +
    +
    +

    Calculates the length of the + hypotenuse of a right-angled triangle with sides of length x and y. + The hypotenuse is the value of the square root of + the sums of the squares of x and y: +

    +

    sqrt(x² + y²) +

    +

    + Note that hypot(x, y), hypot(y, x) and + hypot(x, -y) are equivalent. +

    +

    + - - - -
    Special Values
    x return value divide by 0? invalid? + x y hypot(x, y) invalid?
    ±0.0 -∞ yes no + x ±0.0 |x| no
    < 0.0 NAN no yes + ±∞ y +∞ no
    +∞ +∞ no no + ±∞ NAN +∞ no
    -

    - -

    real log10(real x) -
    Calculate the base-10 logarithm of x. -
    - Special values: + +

    +
    +
    real frexp(real value,out int exp); +
    +
    +

    Separate floating point value into significand and exponent. +

    +

    +

    Returns:

    Calculate and return x and exp such that + value =x*2exp and + .5 <= |x| < 1.0
    + x has same sign as value. +

    +

    + - - - -
    Special values
    x return value divide by 0? invalid? + value returns exp
    ±0.0 -∞ yes no + ±0.0 ±0.0 0
    < 0.0 NAN no yes + +∞ +∞ int.max
    +∞ +∞ no no -
    -

    - -

    real modf(real, real*) -

    - -

    real pow(real, real) -

    - -

    real sqrt(real x) -
    creal sqrt(creal x) -
    Compute square root of x.
    - Special values: - + - - - -
    -∞ -∞ int.min
    x - return value - invalid? -
    -0.0 - -0.0 - no -
    <0.0 - NAN - yes -
    +∞ - +∞ - no + ±NAN ±NAN int.min
    -

    - -

    real ceil(real) -
    real floor(real) -

    - -

    real log1p(real x) -
    Calculates the natural logarithm of - 1 + x. - For very small x, log1p(x) will be more accurate than - log(1 + x). -
    - Special values: + +

    +
    +
    real pow(real x,uint n); +
    real pow(real x,int n); +
    +
    +

    Fast integral powers. + +

    +
    +
    int feqrel(real x,real y); +
    +
    +

    To what precision is x equal to y? +

    +

    +

    Returns:

    the number of mantissa bits which are equal in x and y. + eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision. +

    +

    + - - - - -
    Special values
    x - log1p(x) - divide by 0? - invalid? -
    ±0.0 - ±0.0 - no - no -
    -1.0 - -∞ - yes - no -
    <-1.0 - NAN - no - yes -
    +∞ - -∞ - no - no -
    -

    - -

    real expm1(real x) -
    Calculates the value of the natural logarithm base (e) - raised to the power of x, minus 1. - For very small x, expm1(x) is more accurate - than exp(x)-1. -
    - Special values: - + - - - -
    x y feqrel(x, y)
    x - ex-1 + x x real.mant_dig
    ±0.0 - ±0.0 + x >= 2*x 0
    +∞ - +∞ + x <= x/2 0
    -∞ - -1.0 -
    -

    - -

    real atof(char*) -
    Math functions. -

    - -

    real hypot(real x, real y) -
    - Calculates the length of the - hypotenuse of a right-angled triangle with sides of length x and y. - The hypotenuse is the value of the square root of - the sums of the squares of x and y: -
    -	sqrt(x2 + y2)
    - Note that hypot(x,y), hypot(y,x) and - hypot(x,-y) are equivalent.
    - Special values: - + - - - -
    NAN any 0
    x - y - return value - invalid? -
    x - ±0.0 - fabs(x) - no -
    ±∞ - y - +∞ - no -
    ±∞ - NAN - +∞ - no + any NAN 0
    -

    - -

    int isnan(real e) -
    Is number a nan? -

    - -

    int isfinite(real e) -
    Is number finite? -

    - -

    int isnormal(float f) -
    int isnormal(double d) -
    int isnormal(real e) -
    Is number normalized? -

    - -

    int issubnormal(float f) -
    int issubnormal(double d) -
    int issubnormal(real e) -
    Is number subnormal? (Also called "denormal".) - Subnormals have a 0 exponent and a 0 most significant mantissa bit. -

    - -

    int isinf(real e) -
    Is number infinity? -

    - -

    int signbit(real e) -
    Get sign bit. -

    - -

    real copysign(real to, real from) -
    Copy sign. -

    - -

    int feqrel(real x, real y) -
    To what precision is x equal to y?
    - Returns the number of mantissa bits which are equal in x and y. - eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision.
    - If x == y, then feqrel(x, y) == real.mant_dig.
    - If x and y differ by a factor of two or more, or if one or both - is a nan, the return value is 0. -

    - -

    - - -
    -

    Feedback and Comments

    - - Add feedback and comments regarding this - page. - -
    -Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    - - - - - - - - - +

    +
    +
    + +
    + + +
    +

    Feedback and Comments

    + + Add feedback and comments regarding this + page. + +
    +Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    + + + + + + + + + + + diff -uNr dmd-0.131/dmd/html/d/phobos/std_outbuffer.html dmd-0.132/dmd/html/d/phobos/std_outbuffer.html --- dmd-0.131/dmd/html/d/phobos/std_outbuffer.html 2005-08-22 22:42:58.000000000 +0200 +++ dmd-0.132/dmd/html/d/phobos/std_outbuffer.html 2005-09-19 15:01:30.000000000 +0200 @@ -1,239 +1,255 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Digital Mars - The D Programming Language - std.outbuffer - - - - -www.digitalmars.com - -Home -| Search -| D -| Comments - -
    -Last update Mon Aug 22 2005 -


    - - - -
    -
    -
    - - - - - -
    -
    -
    D
    -
    Language
    -
    Phobos
    -
    Comparisons


    - -object
    -
    - -std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    -
    -std.windows
    -
    -std.linux
    -
    -std.c
    std.c.stdio
    -
    -std.c.windows
    -
    -std.c.linux
    -
    -
    -
    - - -

    std.outbuffer

    - - - -
    - -
    class OutBuffer -
    OutBuffer provides a way to build up an array of bytes out - of raw data. It is useful for things like preparing an - array of bytes to write out to a file. - OutBuffer's byte order is the format native to the computer. - To control the byte order (endianness), use a class derived - from OutBuffer. - To convert an array of bytes back into raw data, use InBuffer. -

    - -

    - -
    void reserve(uint nbytes) -
    Preallocate nbytes more to the size of the internal - buffer. This is a speed optimization, a good guess at the maximum - size of the resulting buffer will improve performance by eliminating - reallocations and copying. -

    - -

    void write(ubyte[] bytes) -
    void write(ubyte b) -
    void write(byte b) -
    void write(char c) -
    void write(ushort w) -
    void write(short s) -
    void write(wchar c) -
    void write(uint w) -
    void write(int i) -
    void write(ulong l) -
    void write(long l) -
    void write(float f) -
    void write(double f) -
    void write(real f) -
    void write(char[] s) -
    void write(OutBuffer buf) -
    Append data to the internal buffer. -

    - -

    void fill0(uint nbytes) -
    Append nbytes of 0 to the internal buffer. -

    - -

    void alignSize(uint alignsize) -
    0-fill to align on an alignsize boundary. - alignsize must be a power of 2. -

    - -

    void align2() -
    Optimize common special case alignSize(2) -

    - -

    void align4() -
    Optimize common special case alignSize(4) -

    - -

    ubyte[] toBytes() -
    Convert internal buffer to array of bytes. -

    - -

    char[] toString() -
    Convert internal buffer to array of chars. -

    - -

    void vprintf(char[] format, va_list args) -
    Append output of vprintf() to internal buffer. -

    - -

    void printf(char[] format, ...) -
    Append output of printf() to internal buffer. -

    - -

    void spread(uint index, uint nbytes) -
    At offset index into buffer, create nbytes - of space by shifting upwards all data past index. -

    - -

    -
    - - -
    -

    Feedback and Comments

    - - Add feedback and comments regarding this - page. - -
    -Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    - - - - - - - - + + + + + + + +Digital Mars - The D Programming Language - std.outbuffer + + + + +www.digitalmars.com + +Home +| Search +| D +| Comments + +
    +Last update Mon Sep 19 15:01:28 2005 + +


    + + + +
    +
    +
    + + + + + +
    +
    +
    D
    +
    Language
    +
    Phobos
    +
    Comparisons


    + +object
    +
    + +std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    +
    +std.windows
    +
    +std.linux
    +
    +std.c
    std.c.stdio
    +
    +std.c.windows
    +
    +std.c.linux
    +
    +
    +
    + + +

    std.outbuffer

    + +
    + +

    +
    +
    class OutBuffer; +
    +
    +

    OutBuffer provides a way to build up an array of bytes out + of raw data. It is useful for things like preparing an + array of bytes to write out to a file. + OutBuffer's byte order is the format native to the computer. + To control the byte order (endianness), use a class derived + from OutBuffer. - - - +

    +
    +
    ubyte[] toBytes(); +
    +
    +

    Convert to array of bytes. + +

    +
    +
    void reserve(uint nbytes); +
    +
    +

    Preallocate nbytes more to the size of the internal buffer. +

    +

    This is a + speed optimization, a good guess at the maximum size of the resulting + buffer will improve performance by eliminating reallocations and copying. + +

    +
    +
    void write(ubyte[]bytes); +
    void write(ubyte b); +
    void write(byte b); +
    void write(char c); +
    void write(ushort w); +
    void write(short s); +
    void write(wchar c); +
    void write(uint w); +
    void write(int i); +
    void write(ulong l); +
    void write(long l); +
    void write(float f); +
    void write(double f); +
    void write(real f); +
    void write(char[]s); +
    void write(OutBuffer buf); +
    +
    +

    Append data to the internal buffer. + +

    +
    +
    void fill0(uint nbytes); +
    +
    +

    Append nbytes of 0 to the internal buffer. + +

    +
    +
    void alignSize(uint alignsize); +
    +
    +

    0-fill to align on power of 2 boundary. + +

    +
    +
    void align2(); +
    +
    +

    Optimize common special case alignSize(2) + +

    +
    +
    void align4(); +
    +
    +

    Optimize common special case alignSize(4) + +

    +
    +
    char[] toString(); +
    +
    +

    Convert internal buffer to array of chars. + +

    +
    +
    void vprintf(char[]format,void*args); +
    +
    +

    Append output of C's vprintf() to internal buffer. + +

    +
    +
    void printf(char[]format,...); +
    +
    +

    Append output of C's printf() to internal buffer. + +

    +
    +
    void spread(uint index,uint nbytes); +
    +
    +

    At offset index into buffer, create nbytes of space by shifting upwards + all data past index. + +

    +
    +
    +
    +
    +
    + +
    + + +
    +

    Feedback and Comments

    + + Add feedback and comments regarding this + page. + +
    +Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    + + + + + + + + + + + diff -uNr dmd-0.131/dmd/html/d/phobos/std_path.html dmd-0.132/dmd/html/d/phobos/std_path.html --- dmd-0.131/dmd/html/d/phobos/std_path.html 2005-08-22 22:42:58.000000000 +0200 +++ dmd-0.132/dmd/html/d/phobos/std_path.html 2005-09-19 17:53:48.000000000 +0200 @@ -1,252 +1,270 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Digital Mars - The D Programming Language - std.path - - - - -www.digitalmars.com - -Home -| Search -| D -| Comments - -
    -Last update Mon Aug 22 2005 -


    - - - -
    -
    -
    - - - - - -
    -
    -
    D
    -
    Language
    -
    Phobos
    -
    Comparisons


    - -object
    -
    - -std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    -
    -std.windows
    -
    -std.linux
    -
    -std.c
    std.c.stdio
    -
    -std.c.windows
    -
    -std.c.linux
    -
    -
    -
    - - -

    std.path

    - -
    - -
    const char[] sep; -
    Character used to separate directory names in a path. -

    - -

    const char[] altsep; -
    Alternate version of sep[], used in Windows. -

    - -

    const char[] pathsep; -
    Path separator string. -

    - -

    const char[] linesep; -
    String used to separate lines. -

    - -

    const char[] curdir; -
    String representing the current directory. -

    - -

    const char[] pardir; -
    String representing the parent directory. -

    - - -

    char[] getExt(char[] fullname) -
    Get extension. - For example, "d:\path\foo.bat" returns "bat". -

    - - -

    char[] getBaseName(char[] fullname) -
    Get base name. - For example, "d:\path\foo.bat" returns "foo.bat". -

    - - -

    char[] getDirName(char[] fullname) -
    Get directory name. - For example, "d:\path\foo.bat" returns "d:\path". -

    - - -

    char[] getDrive(char[] fullname) -
    Get drive. - For example, "d:\path\foo.bat" returns "d:". - Returns null string on systems without the concept of a drive. -

    - - -

    char[] defaultExt(char[] fullname, char[] ext) -
    Put a default extension on fullname if it doesn't already - have an extension. -

    - - -

    char[] addExt(char[] fullname, char[] ext) -
    Add file extension or replace existing extension. -

    - - -

    int isabs(char[] path) -
    Determine if absolute path name. -

    - - -

    char[] join(char[] p1, char[] p2) -
    Join two path components. -

    - - -

    int fncharmatch(dchar c1, dchar c2) -
    Match file name characters. - Case sensitivity depends on the operating system. -

    - - -

    int fnmatch(char[] name, char[] pattern) -
    Match filename strings with pattern[], using the following wildcards: -
    -
    * match 0 or more characters -
    ? match any character -
    [chars] match any character that appears between the [] -
    [!chars] match any character that does not appear between the [! ] -
    - Matching is case sensitive on a file system that is case sensitive.
    - Returns: -
    -
    !=0 match -
    0 no match -
    -

    - - -

    - - -
    -

    Feedback and Comments

    - - Add feedback and comments regarding this - page. - -
    -Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    - - - - - - - - + + + + + + + +Digital Mars - The D Programming Language - std.path + + + + +www.digitalmars.com + +Home +| Search +| D +| Comments + +
    +Last update Mon Sep 19 17:53:47 2005 + +


    + + + +
    +
    +
    + + + + + +
    +
    +
    D
    +
    Language
    +
    Phobos
    +
    Comparisons


    + +object
    +
    + +std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    +
    +std.windows
    +
    +std.linux
    +
    +std.c
    std.c.stdio
    +
    +std.c.windows
    +
    +std.c.linux
    +
    +
    +
    + + +

    std.path

    + +
    + +

    +
    +
    const char[1]sep; +
    +
    +

    String used to separate directory names in a path. +

    +
    +
    const char[1]altsep; +
    +
    +

    Alternate version of sep[], used in Windows. +

    +
    +
    const char[1]pathsep; +
    +
    +

    Path separator string. +

    +
    +
    const char[2]linesep; +
    +
    +

    String used to separate lines. +

    +
    +
    const char[1]curdir; +
    +
    +

    String representing the current directory. +

    +
    +
    const char[2]pardir; +
    +
    +

    String representing the parent directory. +

    +
    +
    char[] getExt(char[]fullname); +
    +
    +

    Get extension. + For example, "d:\path\foo.bat" returns "bat". - +

    +
    +
    char[] getBaseName(char[]fullname); +
    +
    +

    Get base name. + For example, "d:\path\foo.bat" returns "foo.bat". + +

    +
    +
    char[] getDirName(char[]fullname); +
    +
    +

    Get directory name. + For example, "d:\path\foo.bat" returns "d:\path". + +

    +
    +
    char[] getDrive(char[]fullname); +
    +
    +

    Get drive. + For example, "d:\path\foo.bat" returns "d:". + +

    +
    +
    char[] defaultExt(char[]filename,char[]ext); +
    +
    +

    If filename doesn't already have an extension, + append the extension ext and return the result. + +

    +
    +
    char[] addExt(char[]filename,char[]ext); +
    +
    +

    Strip any existing extension off of filename and add the new extension ext. + Return the result. + +

    +
    +
    int isabs(char[]path); +
    +
    +

    Return !=0 if path is absolute (i.e. it starts from the root directory). + +

    +
    +
    char[] join(char[]p1,char[]p2); +
    +
    +

    Join two path components p1 and p2 and return the result. + +

    +
    +
    int fncharmatch(dchar c1,dchar c2); +
    +
    +

    Match file name characters c1 and c2. + Case sensitivity depends on the operating system. + +

    +
    +
    int fnmatch(char[]filename,char[]pattern); +
    +
    +

    Match filename with pattern, using the following wildcards: +

    +

    +
    * match 0 or more characters +
    ? match any character +
    [chars] match any character that appears between the [] +
    [!chars] match any character that does not appear between the [! ] +
    +

    +

    + Matching is case sensitive on a file system that is case sensitive. +

    +

    +

    +

    Returns:

    !=0 for match + +

    +
    +
    + +
    + + +
    +

    Feedback and Comments

    + + Add feedback and comments regarding this + page. + +
    +Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    + + + + + + + + + + + diff -uNr dmd-0.131/dmd/html/d/phobos/std_stream.html dmd-0.132/dmd/html/d/phobos/std_stream.html --- dmd-0.131/dmd/html/d/phobos/std_stream.html 2005-09-06 11:34:28.000000000 +0200 +++ dmd-0.132/dmd/html/d/phobos/std_stream.html 2005-09-19 15:01:30.000000000 +0200 @@ -1,818 +1,1116 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Digital Mars - The D Programming Language - std.stream - - - - -www.digitalmars.com - -Home -| Search -| D -| Comments - -
    -Last update Tue Sep 06 2005 -


    - - - -
    -
    -
    - - - - - -
    -
    -
    D
    -
    Language
    -
    Phobos
    -
    Comparisons


    - -object
    -
    - -std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    -
    -std.windows
    -
    -std.linux
    -
    -std.c
    std.c.stdio
    -
    -std.c.windows
    -
    -std.c.linux
    -
    -
    -
    - - -

    std.stream

    - - - - -
    -
    interface InputStream -
    InputStream is the interface for readable streams. -

    -

    - -
    void readExact(void* buffer, size_t size) -
    Read exactly size bytes into the buffer, throwing a - ReadException if it is not correct. -

    - -

    size_t read(ubyte[] buffer) -
    Read a block of data big enough to fill the given array and - return the actual number of bytes read. Unfilled bytes are not - modified. -

    - -

    void read(out byte x) -
    void read(out ubyte x) -
    void read(out short x) -
    void read(out ushort x) -
    void read(out int x) -
    void read(out uint x) -
    void read(out long x) -
    void read(out ulong x) -
    void read(out float x) -
    void read(out double x) -
    void read(out real x) -
    void read(out ifloat x) -
    void read(out idouble x) -
    void read(out ireal x) -
    void read(out cfloat x) -
    void read(out cdouble x) -
    void read(out creal x) -
    void read(out char x) -
    void read(out wchar x) -
    void read(out dchar x) -
    void read(out char[] s) -
    void read(out wchar[] s) -
    Read a basic type or counted string, throwing a - ReadException if it could not be read. Outside of - byte, ubyte, and char, the format is implementation-specific - and should not be used except as opposite actions to - write. -

    - -

    char[] readLine() -
    char[] readLine(char[] buffer) -
    wchar[] readLineW() -
    wchar[] readLineW(wchar[] buffer) -
    Read a line that is terminated with some combination - of carriage return and line feed or end-of-file. The - terminators are not included. The wchar version is - identical. The optional buffer parameter is - filled (possibly with appending characters) and a slice of - the result is returned. -

    - -

    int opApply(int delegate(inout char[] line) dg) -
    int opApply(int delegate(inout ulong n, inout char[] line) dg) -
    int opApply(int delegate(inout wchar[] line) dg) -
    int opApply(int delegate(inout ulong n, inout wchar[] line) dg) -
    Overload foreach statements to read the stream line by line and - call the supplied delegate with each line or with each line with line - number. The string passed in line may be reused between calls to the - delegate. Line numbering starts at 1. Breaking out of the foreach will - leave the stream position at the beginning of the next line to be read. - For example, to echo a file line-by-line with line numbers run -
    -	
    -	Stream file = new BufferedFile("sample.txt");
    -	foreach(ulong n, char[] line; file) {
    -	  stdout.writefln("line %d: %s",n,line);
    -	}
    -	file.close();
    -	
    -	
    -

    - -

    char[] readString(size_t length) -
    Read a string of the given length, throwing - ReadException if there was a problem. -

    - -

    wchar[] readStringW(size_t length) -
    Read a string of the given length, throwing - ReadException if there was a problem. The file - format is implementation-specific and should not be - used except as opposite actions to write. -

    - -

    char getc() -
    wchar getcw() -
    Read and return the next character in the stream. - This is the only method that will handle ungetc - properly. getcw's format is implementation-specific. - If EOF is reached then getc returns char.init and getcw returns - wchar.init. -

    - -

    char ungetc(char c) -
    wchar ungetcw(wchar c) -
    Push a character back onto the stream. They will - be returned in first-in last-out order from getc/getcw. -

    - -

    int readf(...) -
    int vreadf(TypeInfo[] arguments, va_list args) -
    Scan a string from the input using a similar form - to C's scanf and std.format. - An argument of type char[] is interpreted as a format string. All other - arguments must be pointer types. If a format string is not - present a default will be supplied - computed from the base type of the pointer type. - An argument of type char[]* is filled (possibly with appending - characters) and a slice of the result is assigned back into the - argument. - For example the following readf statements are equivalent -
    -	
    -	int x;
    -	double y;
    -	char[] s;
    -	file.readf(&x, " hello ", &y, &s);
    -	file.readf("%d hello %f %s", &x, &y, &s);
    -	file.readf("%d hello %f", &x, &y, "%s", &s);
    -	
    -	
    -

    - -

    size_t available() -
    Retrieve the nubmer of bytes available for immediate reading. -

    - -

    bool eof() -
    Return whether the current file position is the same as the - end of the file. This does not require actually reading past the - end, as with stdio. For non-seekable streams this - might only return true after attempting to read past the end. -

    - -

    bool isOpen() -
    Return true if the stream is currently open. -

    - -

    - -

    -
    interface OutputStream -
    OutputStream is the interface for writable streams. -

    -

    - -
    void writeExact(void* buffer, size_t size) -
    Write exactly size bytes from buffer, or throw - a WriteException if that could not be done. -

    - -

    size_t write(ubyte[] buffer) -
    Write as much of the buffer as possible, returning the - number of bytes written. -

    - -

    void write(byte x) -
    void write(ubyte x) -
    void write(short x) -
    void write(ushort x) -
    void write(int x) -
    void write(uint x) -
    void write(long x) -
    void write(ulong x) -
    void write(float x) -
    void write(double x) -
    void write(real x) -
    void write(ifloat x) -
    void write(idouble x) -
    void write(ireal x) -
    void write(cfloat x) -
    void write(cdouble x) -
    void write(creal x) -
    void write(char x) -
    void write(wchar x) -
    void write(dchar x) -
    void write(char[] s) -
    void write(wchar[] s) -
    Write a basic type or counted string. Outside of byte, ubyte, - and char, the format is implementation-specific and should only be - used in conjunction with read. -

    - -

    void writeLine(char[] s) -
    Write a line of text, appending the line with an - operating-system-specific line ending. -

    - -

    void writeLineW(wchar[] s) -
    Write a line of text, appending the line with an - operating-system-specific line ending. The format is - implementation-specific. -

    - -

    void writeString(char[] s) -
    Write a string of text, throwing WriteException if - it could not be fully written. -

    - -

    void writeStringW(wchar[] s) -
    Write a string of text, throwing WriteException if - it could not be fully written. The format is - implementation-dependent. -

    - -

    size_t printf(char[] format, ...) -
    size_t vprintf(char[] format, va_list args) -
    Print a formatted string into the stream using printf-style - syntax, returning the number of bytes written. -

    - -

    OutputStream writef(...) -
    OutputStream writefln(...) -
    OutputStream writefx(TypeInfo[] arguments, void* argptr, int newline = false) -
    Print a formatted string into the stream using writef-style - syntax. See std.format. Returns - self to chain with other stream commands like flush. -

    - -

    void flush() -
    Flush pending output if appropriate. -

    - -

    void close() -
    Close the stream, flushing output if appropriate. -

    - -

    bool isOpen() -
    Return true if the stream is currently open. -

    - -

    - -

    -
    class Stream : InputStream,OutputStream -
    Stream is the base abstract class from which the other - stream classes derive. Stream's byte order is the format - native to the computer. -

    -

    -
    bit readable -
    Indicates whether this stream can be read from. -

    - -

    bit writeable -
    Indicates whether this stream can be written to. -

    - -

    bit seekable -
    Indicates whether this stream can be seeked within. -

    - -

    protected bit isopen -
    Indicates whether this stream is open. -

    - -

    protected bit readEOF -
    Indicates whether this stream is at eof after the last - read attempt. -

    - -

    protected bit prevCr -
    For a non-seekable stream indicates that the last readLine - or readLineW ended on a '\r' character. -

    - -

    Reading

    -
    These methods require that the readable flag be set. - Problems with reading result in a ReadException being thrown. - Stream implements the InputStream interface in addition to the - following methods. -

    - -

    size_t readBlock(void* buffer, size_t size) -
    Read up to size bytes into the buffer and return the number - of bytes actually read. A return value of 0 indicates end-of-file. -

    - -

    Writing

    -
    These methods require that the writeable flag be set. - Problems with writing result in a WriteException being thrown. - Stream implements the OutputStream interface in addition to the - following methods. -

    - -

    size_t writeBlock(void* buffer, size_t size) -
    Write up to size bytes from buffer in the - stream, returning the actual number of bytes that were written. -

    - -

    void copyFrom(Stream s) -
    Copies all data from s into this stream. - This may throw ReadException or WriteException - on failure. This restores the file position - of s so that it is unchanged. - -
    void copyFrom(Stream s, size_t count) -
    Copy a specified number of bytes from the given stream - into this one. This may throw ReadException or - WriteException on failure. Unlike the previous form, - this doesn't restore the file position of s. - -

    Seeking

    -
    These methods require that the seekable flag be set. - Problems with seeking result in a SeekException being thrown. -

    - -

    ulong seek(long offset, SeekPos whence) -
    Change the current position of the stream. whence is - either SeekPos.Set, in which case the offset is an absolute - index from the beginning of the stream, SeekPos.Current, in - which case the offset is a delta from the current position, or - SeekPos.End, in which case the offset is a delta from the - end of the stream (negative or zero offsets only make sense in - that case). This returns the new file position. -

    - -

    ulong seekSet(long offset) -
    ulong seekCur(long offset) -
    ulong seekEnd(long offset) -
    Aliases for their normal seek counterparts. -

    - -

    ulong position() -
    void position(ulong pos) -
    Retrieve or set the file position, identical to calling - seek(0, SeekPos.Current) or - seek(pos, SeekPos.Set) respectively. -

    - -

    ulong size() -
    Retrieve the size of the stream in bytes. The stream must - be seekable or a SeekException is thrown. -

    - -

    char[] toString() -
    Read the entire stream and return it as a string. If the stream - is not seekable the contents from the current position to eof is - read and returned. -

    - -

    uint toHash() -
    Get a hash of the stream by reading each byte and using it in - a CRC-32 checksum. -

    -

    - -

    -
    class File : Stream -
    This subclass is for file system streams. -

    - -

    -
    this() -
    this(char[] filename, FileMode mode = FileMode.In) -
    Create the stream with no open file, an open file in read - mode, or an open file with explicit file mode. mode, - if given, is a combination of FileMode.In (indicating a file - that can be read) and FileMode.Out (indicating a file that can - be written). Opening a file for reading that doesn't exist - will error. Opening a file for writing that doesn't exist - will create the file. The FileMode.OutNew mode will - open the file for writing and reset the legnth to zero. The - FileMode.Append mode will open the file for writing and - move the file position to the end of the file. -

    - -

    void open(char[] filename, FileMode mode = FileMode.In) -
    Open a file for the stream, in an identical manner to the - constructors. If an error occurs an OpenException is thrown. -

    - -

    void create(char[] filename, FileMode mode = FileMode.OutNew) -
    Create a file for the stream. -

    - -

    void close() -
    Close the current file if it is open; otherwise it does - nothing. -

    - -

    size_t available() -
    For a seekable file returns the difference of the size - and position and otherwise returns 0. -

    - -

    size_t readBlock(void* buffer, size_t size) -
    size_t writeBlock(void* buffer, size_t size) -
    ulong seek(long offset, SeekPos rel) -
    Overrides of the Stream methods. -

    -

    - -

    -
    class StreamException : Exception -
    A base class for stream exceptions -
    -
    this(char[] msg) -
    Construct a StreamException with given error message -
    -
    class ReadException : StreamException -
    An exception for errors during reading -
    -
    this(char[] msg) -
    Construct a ReadException with given error message -
    -
    class WriteException : StreamException -
    An exception for errors during writing -
    -
    this(char[] msg) -
    Construct a WriteException with given error message -
    -
    class SeekException : StreamException -
    An exception for errors during seeking -
    -
    this(char[] msg) -
    Construct a SeekException with given error message -
    -
    class StreamFileException : StreamException -
    An exception for File errors -
    -
    this(char[] msg) -
    Construct a StreamFileException with given error message -
    -
    class OpenException : StreamFileException -
    An exception for errors during File.open -
    -
    this(char[] msg) -
    Construct a OpenException with given error message -
    - -

    -
    class FilterStream : Stream -
    A base class for streams that wrap a source stream - with additional functionality. The method implementations - forward read/write/seek calls to the source stream. - A FilterStream can change the position of - the source stream arbitrarily and may not keep the source stream - state in sync with the FilterStream, even upon flushing and closing - the FilterStream. - It is recommended to not make - any assumptions about the state of the source position and - read/write state after a FilterStream has acted upon it. - Specifc subclasses of FilterStream should document how they - modify the source stream and if any invariants hold true between the - source and filter. -

    - -

    -
    this(Stream source) -
    Create a FilterStream for the given source. -
    Stream source -
    Property for the source stream. Setting the source stream - closes this stream before attaching the new source. Attaching an - open stream reopens this stream and resets the stream state. -
    bit nestClose -
    Property indicating when this stream closes to close the - source stream as well. Defaults to true. -
    void resetSource() -
    Indicates the source stream changed state and that this - stream should reset any readable, writeable, seekable, isopen and - buffering flags. -
    void close() -
    size_t readBlock(void* buffer, size_t size) -
    size_t writeBlock(void* buffer, size_t size) -
    ulong seek(long offset, SeekPos rel) -
    size_t available() -
    void flush() -
    Overrides of the Stream methods. -
    - -

    -
    class BufferedStream : FilterStream -
    This subclass is for buffering a source stream. A buffered - stream must be closed explicitly to ensure the final buffer - content is written to the source stream. The source stream - position is changed according to the block size so reading or - writing to the BufferedStream may not change the source stream - position by the same amount. -

    - -

    -
    this(Stream source, uint bufferSize = 8192) -
    Create a buffered stream for the stream source with - the buffer size bufferSize. -
    - -

    -
    class BufferedFile : BufferedStream -
    This subclass is for buffered file system streams. It is - a convenience class for wrapping a File in a BufferedStream. - A buffered stream must be closed explicitly to ensure the final - buffer content is written to the file. -

    - -

    -
    this() -
    this(char[] filename, FileMode mode = FileMode.In, uint buffersize = 8192) -
    this(File file, uint buffersize = 8192) -
    void open(char[] filename, FileMode mode = FileMode.In) -
    void create(char[] filename, FileMode mode = FileMode.OutNew) -
    void close() -
    size_t readBlock(void* buffer, size_t size) -
    size_t writeBlock(void* buffer, size_t size) -
    ulong seek(long offset, SeekPos rel) -
    Overrides of the Stream methods. -

    -

    - -

    -
    enum BOM -
    UTF byte-order-mark signatures -
    -
    UTF8 -
    UTF-8 -
    UTF16LE -
    UTF-16 Little Endian -
    UTF16BE -
    UTF-16 Big Endian -
    UTF32LE -
    UTF-32 Little Endian -
    UTF32BE -
    UTF-32 Big Endian -
    -

    - -

    class EndianStream : FilterStream -
    This subclass wraps a stream with big-endian or - little-endian byte order swapping. UTF Byte-Order-Mark (BOM) - signatures can be read and deduced or written. Note that - an EndianStream should not be used as the source of another - FilterStream since a FilterStream call the source with - byte-oriented read/write requests and the EndianStream will not - perform any byte swapping. The EndianStream reads and writes - binary data (non-getc functions) in a one-to-one manner with - the source stream so the source stream's position and state - will be kept in sync with the EndianStream if only non-getc - functions are called. -

    -

    -
    this(Stream source, Endian end = std.system.endian) -
    Create the endian stream for the source stream - source with endianness end. The default - endianness is the native byte order. The Endian type is - defined in the std.system module. -
    Endian endian -
    property for endianness of the source stream -
    int readBOM(int ungetCharSize = 1) -
    Return -1 if no BOM and otherwise read the BOM and return it. - If there is no BOM or if bytes beyond the BOM are read - then the bytes read are pushed back onto the ungetc buffer or - ungetcw buffer. Pass ungetCharSize == 2 to use ungetcw instead - of ungetc when no BOM is present. -
    void writeBOM(BOM b) -
    Write the BOM b to the source stream -
    final void fixBO(void* buffer, size_t size) -
    fix the byte order of the given buffer to match the native order -
    final void fixBlockBO(void* buffer, uint size, size_t repeat) -
    fix the byte order of the given buffer in blocks of the given - size and repeated the given number of times -

    - -

    -

    -
    class TArrayStream(Buffer) : Stream -
    This subclass wraps an array-like buffer with a stream - interface. The type Buffer must support the length - property and reading ubyte slices. Compile in release mode - when directly instantiating a TArrayStream to avoid link errors. -

    -

    -
    this(Buffer buf) -
    Create the stream for the the buffer buf. -

    -

    ubyte[] data() -
    Get the current memory data in total. -

    -

    size_t readBlock(void* buffer, size_t size) -
    size_t writeBlock(void* buffer, size_t size) -
    ulong seek(long offset, SeekPos rel) -
    char[] toString() -
    size_t available() -
    Overrides of Stream methods. -

    - -

    - -

    -
    class MemoryStream : TArrayStream!(ubyte[]) -
    This subclass reads and constructs an array of bytes in - memory. -

    - -

    -
    this() -
    this(ubyte[] data) -
    Create the output buffer and setup for reading, writing, - and seeking. The second constructor loads it with specific - input data. -

    - -

    void reserve(size_t count) -
    Ensure the stream can hold count bytes. -

    - -

    size_t writeBlock(void* buffer, size_t size) -
    Overrides of Stream methods. -

    -

    - -

    -
    class MmFileStream : TArrayStream!(MmFile) -
    This subclass wraps a memory-mapped file with the stream API. - See std.mmfile module. -

    - -

    -
    this(MmFile file) -
    Create stream wrapper for file. -

    -

    void flush() -
    void close() -
    Overrides of Stream methods to forward to MmFile. Note - close deletes the MmFile. -
    - -

    -
    class SliceStream : FilterStream -
    This subclass slices off a portion of another stream, making - seeking relative to the boundaries of the slice. It could be - used to section a large file into a set of smaller files, such as - with tar archives. Reading and writing a SliceStream does not - modify the position of the source stream if it is seekable. -

    - -

    -
    this(Stream source, int low) -
    Indicate both the source stream to use for reading from and the - low part of the slice. The high part of the slice is dependent - upon the end of the source stream, so that if you write beyond the - end it resizes the stream normally. -

    - -

    this(Stream source, int low, int high) -
    Indicate the high index as well. Attempting to read or write - past the high index results in the end being clipped off. -

    - -

    size_t readBlock(void* buffer, size_t size) -
    size_t writeBlock(void* buffer, size_t size) -
    ulong seek(long offset, SeekPos rel) -
    size_t available() -
    Overrides of Stream methods. - -
    - - -
    -

    Feedback and Comments

    - - Add feedback and comments regarding this - page. - -
    -Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    - - - - - - - + + + + + + + +Digital Mars - The D Programming Language - std.stream + + + + +www.digitalmars.com + +Home +| Search +| D +| Comments + +
    +Last update Mon Sep 19 15:01:29 2005 + +


    + + + +
    +
    +
    + + + + + +
    +
    +
    D
    +
    Language
    +
    Phobos
    +
    Comparisons


    + +object
    +
    + +std
    std.base64
    std.boxer
    std.compiler
    std.conv
    std.ctype
    std.date
    std.file
    std.format
    std.gc
    std.intrinsic
    std.math
    std.md5
    std.mmfile
    std.openrj
    std.outbuffer
    std.path
    std.process
    std.random
    std.recls
    std.regexp
    std.socket
    std.socketstream
    std.stdint
    std.stdio
    std.cstream
    std.stream
    std.string
    std.system
    std.thread
    std.uri
    std.utf
    std.zip
    std.zlib
    +
    +std.windows
    +
    +std.linux
    +
    +std.c
    std.c.stdio
    +
    +std.c.windows
    +
    +std.c.linux
    +
    +
    +
    + + +

    std.stream

    + +
    + +

    +
    +
    class StreamException: object.Exception; +
    +
    +

    A base class for stream exceptions. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct a StreamException with given error message. +

    +
    +
    +
    +
    +
    class ReadException: std.stream.StreamException; +
    +
    +

    Thrown when unable to read data from Stream. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct a ReadException with given error message. +

    +
    +
    +
    +
    +
    class WriteException: std.stream.StreamException; +
    +
    +

    Thrown when unable to write data to Stream. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct a WriteException with given error message. +

    +
    +
    +
    +
    +
    class SeekException: std.stream.StreamException; +
    +
    +

    Thrown when unable to move Stream pointer. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct a SeekException with given error message. +

    +
    +
    +
    +
    +
    interface InputStream; +
    +
    +

    InputStream is the interface for readable streams. +

    +
    +
    void readExact(void*buffer,uint size); +
    +
    +

    Read exactly size bytes into the buffer. +

    +

    Throws a ReadException if it is not correct. + +

    +
    +
    uint read(ubyte[]buffer); +
    +
    +

    Read a block of data big enough to fill the given array buffer. +

    +

    +

    Returns:

    the actual number of bytes read. Unfilled bytes are not modified. + +

    +
    +
    void read(out byte x); +
    void read(out ubyte x); +
    void read(out short x); +
    void read(out ushort x); +
    void read(out int x); +
    void read(out uint x); +
    void read(out long x); +
    void read(out ulong x); +
    void read(out float x); +
    void read(out double x); +
    void read(out real x); +
    void read(out ifloat x); +
    void read(out idouble x); +
    void read(out ireal x); +
    void read(out cfloat x); +
    void read(out cdouble x); +
    void read(out creal x); +
    void read(out char x); +
    void read(out wchar x); +
    void read(out dchar x); +
    void read(out char[]s); +
    void read(out wchar[]s); +
    +
    +

    Read a basic type or counted string. +

    +

    Throw a ReadException if it could not be read. + Outside of byte, ubyte, and char, the format is + implementation-specific and should not be used except as opposite actions + to write. + +

    +
    +
    char[] readLine(); +
    char[] readLine(char[]result); +
    wchar[] readLineW(); +
    wchar[] readLineW(wchar[]result); +
    +
    +

    Read a line that is terminated with some combination of carriage return and + line feed or end-of-file. +

    +

    The terminators are not included. The wchar version + is identical. The optional buffer parameter is filled (reallocating + it if necessary) and a slice of the result is returned. + +

    +
    +
    int opApply(int delegate(inout char[]line)dg); +
    int opApply(int delegate(inout ulong n,inout char[]line)dg); +
    int opApply(int delegate(inout wchar[]line)dg); +
    int opApply(int delegate(inout ulong n,inout wchar[]line)dg); +
    +
    +

    Overload foreach statements to read the stream line by line and call the + supplied delegate with each line or with each line with line number. +

    +

    The string passed in line may be reused between calls to the delegate. + Line numbering starts at 1. + Breaking out of the foreach will leave the stream + position at the beginning of the next line to be read. + For example, to echo a file line-by-line with line numbers run: +

    + Stream file = new BufferedFile("sample.txt");
    + foreach(ulong n, char[] line; file) {
    +   stdout.writefln("line %d: %s",n,line);
    + }
    + file.close();
    +
    + +

    +
    +
    char[] readString(uint length); +
    +
    +

    Read a string of the given length, +

    +

    throwing ReadException if there was a problem. +

    +
    +
    wchar[] readStringW(uint length); +
    +
    +

    Read a string of the given length, throwing ReadException if there was a + problem. +

    +

    The file format is implementation-specific and should not be used + except as opposite actions to write. + +

    +
    +
    char getc(); +
    wchar getcw(); +
    +
    +

    Read and return the next character in the stream. +

    +

    This is the only method that will handle ungetc properly. + getcw's format is implementation-specific. + If EOF is reached then getc returns char.init and getcw returns wchar.init. + +

    +
    +
    char ungetc(char c); +
    wchar ungetcw(wchar c); +
    +
    +

    Push a character back onto the stream. +

    +

    They will be returned in first-in last-out order from getc/getcw. + Only has effect on further calls to getc() and getcw(). + +

    +
    +
    int vreadf(TypeInfo []arguments,void*args); +
    int readf(...); +
    +
    +

    Scan a string from the input using a similar form to C's scanf + and std.format. +

    +

    An argument of type char[] is interpreted as a format string. + All other arguments must be pointer types. + If a format string is not present a default will be supplied computed from + the base type of the pointer type. An argument of type char[]* is filled + (possibly with appending characters) and a slice of the result is assigned + back into the argument. For example the following readf statements + are equivalent: +

    + int x;
    + double y;
    + char[] s;
    + file.readf(&x, " hello ", &y, &s);
    + file.readf("%d hello %f %s", &x, &y, &s);
    + file.readf("%d hello %f", &x, &y, "%s", &s);
    +
    + +

    +
    +
    uint available(); +
    +
    +

    Retrieve the number of bytes available for immediate reading. +

    +
    +
    bit eof(); +
    +
    +

    Return whether the current file position is the same as the end of the + file. +

    +

    This does not require actually reading past the end, as with stdio. For + non-seekable streams this might only return true after attempting to read + past the end. + +

    +
    +
    bit isOpen(); +
    +
    +

    Return true if the stream is currently open. +

    +
    +
    +
    +
    +
    interface OutputStream; +
    +
    +

    Interface for writable streams. +

    +
    +
    void writeExact(void*buffer,uint size); +
    +
    +

    Write exactly size bytes from buffer, or throw a WriteException if that + could not be done. + +

    +
    +
    uint write(ubyte[]buffer); +
    +
    +

    Write as much of the buffer as possible, + returning the number of bytes written. + +

    +
    +
    void write(byte x); +
    void write(ubyte x); +
    void write(short x); +
    void write(ushort x); +
    void write(int x); +
    void write(uint x); +
    void write(long x); +
    void write(ulong x); +
    void write(float x); +
    void write(double x); +
    void write(real x); +
    void write(ifloat x); +
    void write(idouble x); +
    void write(ireal x); +
    void write(cfloat x); +
    void write(cdouble x); +
    void write(creal x); +
    void write(char x); +
    void write(wchar x); +
    void write(dchar x); +
    +
    +

    Write a basic type. +

    +

    Outside of byte, ubyte, and char, the format is implementation-specific + and should only be used in conjunction with read. + Throw WriteException on error. + +

    +
    +
    void write(char[]s); +
    void write(wchar[]s); +
    +
    +

    Writes a string, together with its length. +

    +

    The format is implementation-specific + and should only be used in conjunction with read. + Throw WriteException on error. + +

    +
    +
    void writeLine(char[]s); +
    +
    +

    Write a line of text, + appending the line with an operating-system-specific line ending. +

    +

    Throws WriteException on error. + +

    +
    +
    void writeLineW(wchar[]s); +
    +
    +

    Write a line of text, + appending the line with an operating-system-specific line ending. +

    +

    The format is implementation-specific. + Throws WriteException on error. + +

    +
    +
    void writeString(char[]s); +
    +
    +

    Write a string of text. +

    +

    Throws WriteException if it could not be fully written. + +

    +
    +
    void writeStringW(wchar[]s); +
    +
    +

    Write a string of text. +

    +

    The format is implementation-specific. + Throws WriteException if it could not be fully written. + +

    +
    +
    uint vprintf(char[]format,void*args); +
    uint printf(char[]format,...); +
    +
    +

    Print a formatted string into the stream using printf-style syntax, + returning the number of bytes written. + +

    +
    +
    OutputStream writef(...); +
    OutputStream writefln(...); +
    OutputStream writefx(TypeInfo []arguments,void*argptr,int newline = cast(int)(0)); +
    +
    +

    Print a formatted string into the stream using writef-style syntax. +

    +

    References:

    std.format. +

    +

    Returns:

    self to chain with other stream commands like flush. + +

    +
    +
    void flush(); +
    +
    +

    Flush pending output if appropriate. +

    +
    +
    void close(); +
    +
    +

    Close the stream, flushing output if appropriate. +

    +
    +
    bit isOpen(); +
    +
    +

    Return true if the stream is currently open. +

    +
    +
    +
    +
    +
    class Stream: std.stream.InputStream, std.stream.OutputStream; +
    +
    +

    Stream is the base abstract class from which the other stream classes derive. +

    +

    Stream's byte order is the format native to the computer. +

    +

    +

    +

    Reading:

    These methods require that the readable flag be set. + Problems with reading result in a ReadException being thrown. + Stream implements the InputStream interface in addition to the + readBlock method. +

    +

    +

    +

    Writing:

    These methods require that the writeable flag be set. Problems with writing + result in a WriteException being thrown. Stream implements the OutputStream + interface in addition to the following methods: + writeBlock + copyFrom + copyFrom +

    +

    +

    +

    Seeking:

    These methods require that the seekable flag be set. + Problems with seeking result in a SeekException being thrown. + seek, seekSet, seekCur, seekEnd, position, size, toString, toHash + +

    +
    +
    bit readable; +
    +
    +

    Indicates whether this stream can be read from. +

    +
    +
    bit writeable; +
    +
    +

    Indicates whether this stream can be written to. +

    +
    +
    bit seekable; +
    +
    +

    Indicates whether this stream can be seeked within. +

    +
    +
    protected bit isopen; +
    +
    +

    Indicates whether this stream is open. +

    +
    +
    protected bit readEOF; +
    +
    +

    Indicates whether this stream is at eof +

    +
    +
    protected bit prevCr; +
    +
    +

    For a non-seekable stream indicates that +

    +
    +
    this(); +
    +
    +

    the last readLine or readLineW ended on a +

    +

    '\r' character. +

    +
    +
    uint readBlock(void*buffer,uint size); +
    +
    +

    Read up to size bytes into the buffer and return the number of bytes + actually read. A return value of 0 indicates end-of-file. + +

    +
    +
    uint writeBlock(void*buffer,uint size); +
    +
    +

    Write up to size bytes from buffer in the stream, returning the actual + number of bytes that were written. + +

    +
    +
    void copyFrom(Stream s); +
    +
    +

    Copies all data from s into this stream. + This may throw ReadException or WriteException on failure. + This restores the file position of s so that it is unchanged. + +

    +
    +
    void copyFrom(Stream s,ulong count); +
    +
    +

    Copy a specified number of bytes from the given stream into this one. + This may throw ReadException or WriteException on failure. + Unlike the previous form, this doesn't restore the file position of s. + +

    +
    +
    ulong seek(long offset,SeekPos whence); +
    +
    +

    Change the current position of the stream. whence is either SeekPos.Set, in + which case the offset is an absolute index from the beginning of the stream, + SeekPos.Current, in which case the offset is a delta from the current + position, or SeekPos.End, in which case the offset is a delta from the end of + the stream (negative or zero offsets only make sense in that case). This + returns the new file position. + +

    +
    +
    ulong seekSet(long offset); +
    ulong seekCur(long offset); +
    ulong seekEnd(long offset); +
    +
    +

    Aliases for their normal seek counterparts. + +

    +
    +
    void position(ulong pos); +
    +
    +

    Sets file position. Equivalent to calling seek(pos, SeekPos.Set). + +

    +
    +
    ulong position(); +
    +
    +

    Returns current file position. Equivalent to seek(0, SeekPos.Current). + +

    +
    +
    ulong size(); +
    +
    +

    Retrieve the size of the stream in bytes. + The stream must be seekable or a SeekException is thrown. + +

    +
    +
    char[] toString(); +
    +
    +

    Read the entire stream and return it as a string. + If the stream is not seekable the contents from the current position to eof + is read and returned. + +

    +
    +
    uint toHash(); +
    +
    +

    Get a hash of the stream by reading each byte and using it in a CRC-32 + checksum. + +

    +
    +
    +
    +
    +
    class FilterStream: std.stream.Stream; +
    +
    +

    A base class for streams that wrap a source stream with additional + functionality. +

    +

    The method implementations forward read/write/seek calls to the + source stream. A FilterStream can change the position of the source stream + arbitrarily and may not keep the source stream state in sync with the + FilterStream, even upon flushing and closing the FilterStream. It is + recommended to not make any assumptions about the state of the source position + and read/write state after a FilterStream has acted upon it. Specifc subclasses + of FilterStream should document how they modify the source stream and if any + invariants hold true between the source and filter. + +

    +
    +
    bit nestClose; +
    +
    +

    Property indicating when this stream closes to close the source stream as +

    +

    well. +

    +

    + Defaults to true. +

    +
    +
    this(Stream source); +
    +
    +

    Construct a FilterStream for the given source. +

    +
    +
    final Stream source(); +
    +
    +

    Get the current source stream. + +

    +
    +
    void source(Stream s); +
    +
    +

    Set the current source stream. +

    +

    Setting the source stream closes this stream before attaching the new + source. Attaching an open stream reopens this stream and resets the stream + state. + +

    +
    +
    void resetSource(); +
    +
    +

    Indicates the source stream changed state and that this stream should reset + any readable, writeable, seekable, isopen and buffering flags. + +

    +
    +
    +
    +
    +
    class BufferedStream: std.stream.FilterStream; +
    +
    +

    This subclass is for buffering a source stream. +

    +

    A buffered stream must be + closed explicitly to ensure the final buffer content is written to the source + stream. The source stream position is changed according to the block size so + reading or writing to the BufferedStream may not change the source stream + position by the same amount. + +

    +
    +
    this(Stream source,uint bufferSize = cast(uint)(8192)); +
    +
    +

    Create a buffered stream for the stream source with the buffer size + bufferSize. + +

    +
    +
    +
    +
    +
    class StreamFileException: std.stream.StreamException; +
    +
    +

    An exception for File errors. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct a StreamFileException with given error message. +

    +
    +
    +
    +
    +
    class OpenException: std.stream.StreamFileException; +
    +
    +

    An exception for errors during File.open. +

    +
    +
    this(char[]msg); +
    +
    +

    Construct an OpenFileException with given error message. +

    +
    +
    +
    +
    +
    class File: std.stream.Stream; +
    +
    +

    This subclass is for unbuffered file system streams. +

    +
    +
    this(char[]filename,FileMode mode = cast(FileMode)1); +
    +
    +

    Create the stream with no open file, an open file in read mode, or an open + file with explicit file mode. + mode, if given, is a combination of FileMode.In + (indicating a file that can be read) and FileMode.Out (indicating a file + that can be written). + Opening a file for reading that doesn't exist will error. + Opening a file for writing that doesn't exist will create the file. + The FileMode.OutNew mode will open the file for writing and reset the + length to zero. + The FileMode.Append mode will open the file for writing and move the + file position to the end of the file. + +

    +
    +
    void open(char[]filename,FileMode mode = cast(FileMode)1); +
    +
    +

    Open a file for the stream, in an identical manner to the constructors. + If an error occurs an OpenException is thrown. + +

    +
    +
    void create(char[]filename); +
    void create(char[]filename,FileMode mode); +
    +
    +

    Create a file for writing. +

    +
    +
    void close(); +
    +
    +

    Close the current file if it is open; otherwise it does nothing. +

    +
    +
    uint available(); +
    +
    +

    For a seekable file returns the difference of the size and position and + otherwise returns 0. + +

    +
    +
    +
    +
    +
    class BufferedFile: std.stream.BufferedStream; +
    +
    +

    This subclass is for buffered file system streams. +

    +

    It is a convenience class for wrapping a File in a BufferedStream. + A buffered stream must be closed explicitly to ensure the final buffer + content is written to the file. + +

    +
    +
    +
    +
    +
    enum BOM; +
    +
    +

    UTF byte-order-mark signatures +

    +
    +
    UTF8
    +
    +

    UTF-8 +

    +
    +
    UTF16LE
    +
    +

    UTF-16 Little Endian +

    +
    +
    UTF16BE
    +
    +

    UTF-16 Big Endian +

    +
    +
    UTF32LE
    +
    +

    UTF-32 Little Endian +

    +
    +
    UTF32BE
    +
    +

    UTF-32 Big Endian +

    +
    +
    +
    +
    class EndianStream: std.stream.FilterStream; +
    +
    +

    This subclass wraps a stream with big-endian or little-endian byte order + swapping. +

    +

    UTF Byte-Order-Mark (BOM) signatures can be read and deduced or + written. + Note that an EndianStream should not be used as the source of another + FilterStream since a FilterStream call the source with byte-oriented + read/write requests and the EndianStream will not perform any byte swapping. + The EndianStream reads and writes binary data (non-getc functions) in a + one-to-one + manner with the source stream so the source stream's position and state will be + kept in sync with the EndianStream if only non-getc functions are called. + +

    +
    +
    Endian endian; +
    +
    +

    Endianness property of the source stream. +

    +
    +
    this(Stream source,Endian end = endian); +
    +
    +

    Create the endian stream for the source stream source with endianness end. + The default endianness is the native byte order. + The Endian type is defined + in the std.system module. + +

    +
    +
    int readBOM(int ungetCharSize = 1); +
    +
    +

    Return -1 if no BOM and otherwise read the BOM and return it. +

    +

    If there is no BOM or if bytes beyond the BOM are read then the bytes read + are pushed back onto the ungetc buffer or ungetcw buffer. + Pass ungetCharSize == 2 to use + ungetcw instead of ungetc when no BOM is present. + +

    +
    +
    final void fixBO(void*buffer,uint size); +
    +
    +

    Correct the byte order of buffer to match native endianness. + size must be even. + +

    +
    +
    final void fixBlockBO(void*buffer,uint size,uint repeat); +
    +
    +

    Correct the byte order of the given buffer in blocks of the given size and + repeated the given number of times. + size must be even. + +

    +
    +
    void writeBOM(BOM b); +
    +
    +

    Write the specified BOM b to the source stream. +

    +
    +
    +
    +
    +
    class TArrayStream(Buffer): Stream; +
    +
    +

    Parameterized subclass that wraps an array-like buffer with a stream + interface. +

    +

    The type Buffer must support the length property, opIndex and opSlice. + Compile in release mode when directly instantiating a TArrayStream to avoid + link errors. + +

    +
    +
    this(Buffer buf); +
    +
    +

    Create the stream for the the buffer buf. Non-copying. +

    +
    +
    ubyte[] data(); +
    +
    +

    Get the current memory data in total. +

    +
    +
    +
    +
    +
    class MemoryStream: std.stream.TArrayStream!(ubyte[]).TArrayStream; +
    +
    +

    This subclass reads and constructs an array of bytes in memory. +

    +
    +
    this(); +
    +
    +

    Create the output buffer and setup for reading, writing, and seeking. +

    +
    +
    this(ubyte[]buf); +
    this(byte[]buf); +
    this(char[]buf); +
    +
    +

    Create the output buffer and setup for reading, writing, and seeking. + Load it with specific input data. + +

    +
    +
    void reserve(uint count); +
    +
    +

    Ensure the stream can hold count bytes. +

    +
    +
    +
    +
    +
    class MmFileStream: std.stream.TArrayStream!(MmFile ).TArrayStream; +
    +
    +

    This subclass wraps a memory-mapped file with the stream API. + See std.mmfile module. + +

    +
    +
    this(MmFile file); +
    +
    +

    Create stream wrapper for file. +

    +
    +
    +
    +
    +
    class SliceStream: std.stream.FilterStream; +
    +
    +

    This subclass slices off a portion of another stream, making seeking relative + to the boundaries of the slice. +

    +

    It could be used to section a large file into a + set of smaller files, such as with tar archives. Reading and writing a + SliceStream does not modify the position of the source stream if it is + seekable. +

    +
    +
    this(Stream s,ulong low); +
    +
    +

    Indicate both the source stream to use for reading from and the low part of + the slice. +

    +

    The high part of the slice is dependent upon the end of the source + stream, so that if you write beyond the end it resizes the stream normally. + +

    +
    +
    this(Stream s,ulong low,ulong high); +
    +
    +

    Indicate the high index as well. +

    +

    Attempting to read or write past the high + index results in the end being clipped off. + +

    +
    +
    +
    +
    +
    + +
    + + +
    +

    Feedback and Comments

    + + Add feedback and comments regarding this + page. + +
    +Copyright © 1999-2005 by Digital Mars, All Rights Reserved

    + + + + + + + + + + + diff -uNr dmd-0.131/dmd/html/d/portability.html dmd-0.132/dmd/html/d/portability.html --- dmd-0.131/dmd/html/d/portability.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/portability.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005


    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/pragma.html dmd-0.132/dmd/html/d/pragma.html --- dmd-0.131/dmd/html/d/pragma.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/pragma.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/pretod.html dmd-0.132/dmd/html/d/pretod.html --- dmd-0.131/dmd/html/d/pretod.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/pretod.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    diff -uNr dmd-0.131/dmd/html/d/property.html dmd-0.132/dmd/html/d/property.html --- dmd-0.131/dmd/html/d/property.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/property.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/rationale.html dmd-0.132/dmd/html/d/rationale.html --- dmd-0.131/dmd/html/d/rationale.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/rationale.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005

    Rationale

    diff -uNr dmd-0.131/dmd/html/d/statement.html dmd-0.132/dmd/html/d/statement.html --- dmd-0.131/dmd/html/d/statement.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/statement.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    @@ -210,7 +211,7 @@ The idea is to avoid bugs in complex functions caused by - scoped declarations inadvertantly hiding previous ones. + scoped declarations inadvertently hiding previous ones. Local names should all be unique within a function.

    Expression Statement

    @@ -302,7 +303,7 @@

    A break statement will exit the loop. A continue statement - will transfer directly to evaluationg Expression again. + will transfer directly to evaluating Expression again.

    For Statement

    diff -uNr dmd-0.131/dmd/html/d/struct.html dmd-0.132/dmd/html/d/struct.html --- dmd-0.131/dmd/html/d/struct.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/struct.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/template.html dmd-0.132/dmd/html/d/template.html --- dmd-0.131/dmd/html/d/template.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/template.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/type.html dmd-0.132/dmd/html/d/type.html --- dmd-0.131/dmd/html/d/type.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/type.html 2005-09-18 11:39:22.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/version.html dmd-0.132/dmd/html/d/version.html --- dmd-0.131/dmd/html/d/version.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/version.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005
    @@ -91,6 +91,7 @@ · Memory Management
    · Floating Point
    · Inline Assembler
    Documentation Comments
    · Interfacing To C
    · Portability Guide
    · Embedding D in HTML
    diff -uNr dmd-0.131/dmd/html/d/windows.html dmd-0.132/dmd/html/d/windows.html --- dmd-0.131/dmd/html/d/windows.html 2005-08-26 11:54:10.000000000 +0200 +++ dmd-0.132/dmd/html/d/windows.html 2005-09-18 11:39:24.000000000 +0200 @@ -45,7 +45,7 @@ target="_top" title="Read/write comments and feedback">Comments
    -Last update Fri Aug 26 2005 +Last update Sun Sep 18 2005