diff -uNr dmd-0.162/dmd/html/d/abi.html dmd-0.163/dmd/html/d/abi.html --- dmd-0.162/dmd/html/d/abi.html 2006-06-16 00:33:16.000000000 +0200 +++ dmd-0.163/dmd/html/d/abi.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -
- Dynamic array properties are: +
Dynamic array properties are:
.sizeof @@ -530,9 +529,23 @@ Returns the array. |
- Examples: +
For the .sort property to work on arrays of class + objects, the class definition must define the function: + int opCmp(Object). This is used to determine the + ordering of the class objects. Note that the parameter + is of type Object, not the type of the class.
+ +For the .sort property to work on arrays of + structs or unions, the struct or union definition must + define the function: + int opCmp(S) or + int opCmp(S*). + The type S is the type of the struct or union. + This function will determine the sort ordering. +
+ +Examples:
p.length // error, length not known for pointer s.length // compile time constant 3 @@ -706,11 +719,17 @@ int value[Color.max + 1] = [ Color.blue:6, Color.green:2, Color.red:5 ];+ If any members of an array are initialized, they all must be. + This is to catch + common errors where another element is added to an enum, + but one of the static instances + of arrays of that enum was overlooked in updating the + initializer list.
Classes can be used as the KeyType. For this to work, + the class definition must override the following member functions + of class Object:
+ +Note that the parameter to opCmp and opEquals is + of type + Object, not the type of the class in which it is defined.
+ +For example:
+ +class Foo +{ + int a, b; + + hash_t toHash() { return a + b; } + + int opEquals(Object o) + { Foo f = cast(Foo) o; + return f && a == foo.a && b == foo.b; + } + + int opCmp(Object o) + { Foo f = cast(Foo) o; + if (!f) + return -1; + if (a == foo.a) + return b - foo.b; + return a - foo.a; + } +} ++ +
Structs or unions can be used as the KeyType. For this to work, + the struct or union definition must define the following + member functions:
+ +Note that the parameter to opCmp and opEquals + can be either the struct or union type, or a pointer to the struct + or untion type.
+ +For example:
+ +struct S +{ + int a, b; + + hash_t toHash() { return a + b; } + + int opEquals(S s) + { + return a == s.a && b == s.b; + } + + int opCmp(S* s) + { + if (a == s.a) + return b - s.b; + return a - s.a; + } +} ++
Symbols from one module are made available in another module + by using the ImportDeclaration: +
ImportDeclaration: - import ModuleNameList ; + import ImportList ; + static import ImportList ; -ModuleNameList: +ImportList: + Import + ImportBindings + Import , ImportList + +Import: ModuleName - ModuleName , ModuleNameList + ModuleAliasIdentifier = ModuleName + +ImportBindings: + Import : ImportBindList + +ImportBindList: + ImportBind + ImportBind , ImportBindList + +ImportBind: + Identifier + Identifier =- The rightmost Identifier becomes the module name. - The top level scope in the module is merged with the current scope. -
+
There are several forms of the ImportDeclaration, + from generalized to fine-grained importing.
- Example: +The order in which ImportDeclarations occur has no + significance.
-import std.c.stdio; // import module <b>stdio</b> from the <b>c</b> package -import foo, bar; // import modules <b>foo</b> and <b>bar</b> -+
ModuleNames in the ImportDeclaration must be fully + qualified + with whatever packages they are in. They are not considered to + be relative to the module that imports them.
+ +The simplest form of importing is to just list the + modules being imported:
+ +import std.stdio; // import module stdio from the std package +import foo, bar; // import modules foo and bar + +void main() +{ + writefln("hello!\n"); // calls std.stdio.writefln +} +-
How basic imports work is that first a name is searched for in the + current namespace. If it is not found, then it is looked for in the + imports. + If it is found uniquely among the imports, then that is used. If it is + in more than one import, an error occurs. +
+ +module A; +void foo(); +void bar(); +- Each module forms its own namespace. When a module is imported - into another module, by default all its top level declarations are - available without qualification. Ambiguities are illegal, and - can be resolved by explicitly qualifying the symbol with the - module name. -
+
module B; +void foo(); +void bar(); +- For example, assume the following modules: +
module C; +import A; +void foo(); +void test() +{ foo(); // C.foo() is called, it is found before imports are searched + bar(); // A.bar() is called, since imports are searched +} +-
// Module foo -int x = 1; -int y = 2; +module D; +import A; +import B; +void test() +{ foo(); // error, A.foo() or B.foo() ? + A.foo(); // ok, call A.foo() + B.foo(); // ok, call B.foo() +} +-// Module bar -int y = 3; -int z = 4; +module E; +import A; +import B; +alias B.foo foo; +void test() +{ foo(); // call B.foo() + A.foo(); // call A.foo() + B.foo(); // call B.foo() +}- then: +Public Imports
+ +By default, imports are private. This means that + if module A imports module B, and module B imports module + C, then C's names are not searched for. An import can + be specifically declared public, when it will be + treated as if any imports of the module with the ImportDeclaration + also import the public imported modules. +
-import foo; +module A; +void foo() { } ++ +module B; +void bar() { } ++ +module C; +import A; +public import B; ... -q = y; // sets q to foo.y +foo(); // call A.foo() +bar(); // calls B.bar()- and: - -import foo; -int y = 5; -q = y; // local y overrides foo.y ++module D; +import C; +... +foo(); // error, foo() is undefined +bar(); // ok, calls B.bar()- and: +Static Imports
-import foo; -import bar; -q = y; // error: foo.y or bar.y? -+Basic imports work well for programs with relatively few modules + and imports. If there are a lot of imports, name collisions + can start occurring between the names in the various imported modules. + One way to stop this is by using static imports. + A static import requires one to use a fully qualified name + to reference the module's names: +
- and: +static import std.stdio; -+ + +import foo; -import bar; -q = bar.y; // q set to 3 -+void main() +{ + writefln("hello!"); // error, writefln is undefined + std.stdio.writefln("hello!"); // ok, writefln is fully qualified +} +Renamed Imports
+ +A local name for an import can be given, through which + all references to the module's symbols must be qualified + with:
- If the import is private, such as: +import io = std.stdio; -module abc; -private import def; +void main() +{ + io.writefln("hello!"); // ok, calls std.stdio.writefln + std.stdio.writefln("hello!"); // error, std is undefined + writefln("hello!"); // error, writefln is undefined +} ++ +Renamed imports are handy when dealing with + very long import names.
+ +Selective Imports
+ +Specific symbols can be exclusively imported from + a module and bound into the current namespace:
+ +import std.stdio : writefln, foo = writef; + +void main() +{ + std.stdio.writefln("hello!"); // error, std is undefined + writefln("hello!"); // ok, writefln bound into current namespace + writef("world"); // error, writef is undefined + foo("world"); // ok, calls std.stdio.writef() + fwritefln(stdout, "abc"); // error, fwritefln undefined +}- then def is not searched when another module imports abc. -Module Scope Operator
+Module Scope Operator
Sometimes, it's necessary to override the usual lexical scoping rules to access a name hidden by a local name. This is done with the diff -uNr dmd-0.162/dmd/html/d/operatoroverloading.html dmd-0.163/dmd/html/d/operatoroverloading.html --- dmd-0.162/dmd/html/d/operatoroverloading.html 2006-06-07 00:54:00.000000000 +0200 +++ dmd-0.163/dmd/html/d/operatoroverloading.html 2006-07-13 00:55:10.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Wed Jun 7 00:54:00 2006 +@@ -433,13 +433,13 @@ -Last update Thu Jul 13 00:55:08 2006- Given a binary +
Given a binary overloadable operator op and its corresponding class or struct member function name opfunc and opfunc_r, and the syntax: +
a op b @@ -517,23 +517,42 @@Overloading == and !=
- Both operators use the opEquals() function. The expression +Both operators use the opEquals() function. + The expression (a == b) is rewritten as a.opEquals(b), and (a != b) is rewritten as !a.opEquals(b). -
+
- The member function opEquals() is defined as part of Object - as: +The member function opEquals() is defined as part of + Object as: +
int opEquals(Object o);
- so that every class object has an opEquals(). -+
so that every class object has a default opEquals(). + But every class definition which will be using == or != should + expect to need to override opEquals. The parameter to the overriding + function must be of type Object, not the type for the class. +
+ +Structs and unions (hereafter just called structs) can + provide a member function: +
- If a struct has no opEquals() function declared for it, +int opEquals(S s) +
+or:
+int opEquals(S* s) +
+ +where S is the struct name, to define how equality is + determined.
+ +If a struct has no opEquals function declared for it, a bit compare of the contents of the two structs is done to determine equality or inequality. +
Overloading <, <=, > and >=
@@ -569,9 +588,10 @@ which will fail if opCmp() is a virtual function.Rationale
- The reason for having both opEquals() and opCmp() is that: --
- Testing for equality can sometimes be a much more efficient + +
The reason for having both opEquals() and opCmp() is that:
+ +
- Testing for equality can sometimes be a much more efficient operation than testing for less or greater than.
- For some objects, testing for less or greater makes no sense. For these, override opCmp() with: @@ -587,6 +607,13 @@
The parameter to opEquals and opCmp + for class definitions must + be of type Object, rather than the type of the particular class, + in order to override the Object.opEquals and Object.opCmp + functions properly. +
+Function Call Operator Overloading f()
The function call operator, (), can be overloaded by diff -uNr dmd-0.162/dmd/html/d/overview.html dmd-0.163/dmd/html/d/overview.html --- dmd-0.162/dmd/html/d/overview.html 2006-06-13 16:04:04.000000000 +0200 +++ dmd-0.163/dmd/html/d/overview.html 2006-07-01 00:48:38.000000000 +0200 @@ -31,7 +31,7 @@ -Last update Tue Jun 13 16:04:02 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/object.html dmd-0.163/dmd/html/d/phobos/object.html --- dmd-0.162/dmd/html/d/phobos/object.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/object.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Sat Jul 1 00:48:37 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/phobos.html dmd-0.163/dmd/html/d/phobos/phobos.html --- dmd-0.162/dmd/html/d/phobos/phobos.html 2006-06-30 17:14:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/phobos.html 2006-07-18 01:39:30.000000000 +0200 @@ -29,7 +29,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:20 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_base64.html dmd-0.163/dmd/html/d/phobos/std_base64.html --- dmd-0.162/dmd/html/d/phobos/std_base64.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_base64.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_bitarray.html dmd-0.163/dmd/html/d/phobos/std_bitarray.html --- dmd-0.162/dmd/html/d/phobos/std_bitarray.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_bitarray.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_boxer.html dmd-0.163/dmd/html/d/phobos/std_boxer.html --- dmd-0.162/dmd/html/d/phobos/std_boxer.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_boxer.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_fenv.html dmd-0.163/dmd/html/d/phobos/std_c_fenv.html --- dmd-0.162/dmd/html/d/phobos/std_c_fenv.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_fenv.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_math.html dmd-0.163/dmd/html/d/phobos/std_c_math.html --- dmd-0.162/dmd/html/d/phobos/std_c_math.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_math.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_compiler.html dmd-0.163/dmd/html/d/phobos/std_compiler.html --- dmd-0.162/dmd/html/d/phobos/std_compiler.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_compiler.html 2006-07-18 01:39:26.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_conv.html dmd-0.163/dmd/html/d/phobos/std_conv.html --- dmd-0.162/dmd/html/d/phobos/std_conv.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_conv.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_cover.html dmd-0.163/dmd/html/d/phobos/std_cover.html --- dmd-0.162/dmd/html/d/phobos/std_cover.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_cover.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_process.html dmd-0.163/dmd/html/d/phobos/std_c_process.html --- dmd-0.162/dmd/html/d/phobos/std_c_process.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_process.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_stdarg.html dmd-0.163/dmd/html/d/phobos/std_c_stdarg.html --- dmd-0.162/dmd/html/d/phobos/std_c_stdarg.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_stdarg.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_stddef.html dmd-0.163/dmd/html/d/phobos/std_c_stddef.html --- dmd-0.162/dmd/html/d/phobos/std_c_stddef.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_stddef.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_stdio.html dmd-0.163/dmd/html/d/phobos/std_c_stdio.html --- dmd-0.162/dmd/html/d/phobos/std_c_stdio.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_stdio.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_stdlib.html dmd-0.163/dmd/html/d/phobos/std_c_stdlib.html --- dmd-0.162/dmd/html/d/phobos/std_c_stdlib.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_stdlib.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_cstream.html dmd-0.163/dmd/html/d/phobos/std_cstream.html --- dmd-0.162/dmd/html/d/phobos/std_cstream.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_cstream.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_string.html dmd-0.163/dmd/html/d/phobos/std_c_string.html --- dmd-0.162/dmd/html/d/phobos/std_c_string.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_string.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:20 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_time.html dmd-0.163/dmd/html/d/phobos/std_c_time.html --- dmd-0.162/dmd/html/d/phobos/std_c_time.html 2006-06-30 17:14:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_time.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:20 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_ctype.html dmd-0.163/dmd/html/d/phobos/std_ctype.html --- dmd-0.162/dmd/html/d/phobos/std_ctype.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_ctype.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_c_wcharh.html dmd-0.163/dmd/html/d/phobos/std_c_wcharh.html --- dmd-0.162/dmd/html/d/phobos/std_c_wcharh.html 2006-06-30 17:14:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_c_wcharh.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:20 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_date.html dmd-0.163/dmd/html/d/phobos/std_date.html --- dmd-0.162/dmd/html/d/phobos/std_date.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_date.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_demangle.html dmd-0.163/dmd/html/d/phobos/std_demangle.html --- dmd-0.162/dmd/html/d/phobos/std_demangle.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_demangle.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_file.html dmd-0.163/dmd/html/d/phobos/std_file.html --- dmd-0.162/dmd/html/d/phobos/std_file.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_file.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_format.html dmd-0.163/dmd/html/d/phobos/std_format.html --- dmd-0.162/dmd/html/d/phobos/std_format.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_format.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_gc.html dmd-0.163/dmd/html/d/phobos/std_gc.html --- dmd-0.162/dmd/html/d/phobos/std_gc.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_gc.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_intrinsic.html dmd-0.163/dmd/html/d/phobos/std_intrinsic.html --- dmd-0.162/dmd/html/d/phobos/std_intrinsic.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_intrinsic.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_math.html dmd-0.163/dmd/html/d/phobos/std_math.html --- dmd-0.162/dmd/html/d/phobos/std_math.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_math.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:16 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_md5.html dmd-0.163/dmd/html/d/phobos/std_md5.html --- dmd-0.162/dmd/html/d/phobos/std_md5.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_md5.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:24 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_mmfile.html dmd-0.163/dmd/html/d/phobos/std_mmfile.html --- dmd-0.162/dmd/html/d/phobos/std_mmfile.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_mmfile.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_openrj.html dmd-0.163/dmd/html/d/phobos/std_openrj.html --- dmd-0.162/dmd/html/d/phobos/std_openrj.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_openrj.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_outbuffer.html dmd-0.163/dmd/html/d/phobos/std_outbuffer.html --- dmd-0.162/dmd/html/d/phobos/std_outbuffer.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_outbuffer.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_path.html dmd-0.163/dmd/html/d/phobos/std_path.html --- dmd-0.162/dmd/html/d/phobos/std_path.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_path.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:16 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_process.html dmd-0.163/dmd/html/d/phobos/std_process.html --- dmd-0.162/dmd/html/d/phobos/std_process.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_process.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:24 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_random.html dmd-0.163/dmd/html/d/phobos/std_random.html --- dmd-0.162/dmd/html/d/phobos/std_random.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_random.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_regexp.html dmd-0.163/dmd/html/d/phobos/std_regexp.html --- dmd-0.162/dmd/html/d/phobos/std_regexp.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_regexp.html 2006-07-18 12:58:42.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_socket.html dmd-0.163/dmd/html/d/phobos/std_socket.html --- dmd-0.162/dmd/html/d/phobos/std_socket.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_socket.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 12:58:40 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_socketstream.html dmd-0.163/dmd/html/d/phobos/std_socketstream.html --- dmd-0.162/dmd/html/d/phobos/std_socketstream.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_socketstream.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_stdint.html dmd-0.163/dmd/html/d/phobos/std_stdint.html --- dmd-0.162/dmd/html/d/phobos/std_stdint.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_stdint.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_stdio.html dmd-0.163/dmd/html/d/phobos/std_stdio.html --- dmd-0.162/dmd/html/d/phobos/std_stdio.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_stdio.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_stream.html dmd-0.163/dmd/html/d/phobos/std_stream.html --- dmd-0.162/dmd/html/d/phobos/std_stream.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_stream.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_string.html dmd-0.163/dmd/html/d/phobos/std_string.html --- dmd-0.162/dmd/html/d/phobos/std_string.html 2006-06-30 17:14:18.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_string.html 2006-07-18 01:39:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:17 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_system.html dmd-0.163/dmd/html/d/phobos/std_system.html --- dmd-0.162/dmd/html/d/phobos/std_system.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_system.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:25 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_thread.html dmd-0.163/dmd/html/d/phobos/std_thread.html --- dmd-0.162/dmd/html/d/phobos/std_thread.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_thread.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_uni.html dmd-0.163/dmd/html/d/phobos/std_uni.html --- dmd-0.162/dmd/html/d/phobos/std_uni.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_uni.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_uri.html dmd-0.163/dmd/html/d/phobos/std_uri.html --- dmd-0.162/dmd/html/d/phobos/std_uri.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_uri.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_utf.html dmd-0.163/dmd/html/d/phobos/std_utf.html --- dmd-0.162/dmd/html/d/phobos/std_utf.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_utf.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_windows_charset.html dmd-0.163/dmd/html/d/phobos/std_windows_charset.html --- dmd-0.162/dmd/html/d/phobos/std_windows_charset.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_windows_charset.html 2006-07-18 01:39:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:27 2006Last update Fri Jun 30 17:14:19 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_zip.html dmd-0.163/dmd/html/d/phobos/std_zip.html --- dmd-0.162/dmd/html/d/phobos/std_zip.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_zip.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:28 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/phobos/std_zlib.html dmd-0.163/dmd/html/d/phobos/std_zlib.html --- dmd-0.162/dmd/html/d/phobos/std_zlib.html 2006-06-30 17:14:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/phobos/std_zlib.html 2006-07-18 01:39:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Fri Jun 30 17:14:18 2006 +diff -uNr dmd-0.162/dmd/html/d/portability.html dmd-0.163/dmd/html/d/portability.html --- dmd-0.162/dmd/html/d/portability.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/portability.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Tue Jul 18 01:39:26 2006Last update Tue Jun 6 16:38:20 2006 +diff -uNr dmd-0.162/dmd/html/d/pragma.html dmd-0.163/dmd/html/d/pragma.html --- dmd-0.162/dmd/html/d/pragma.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/pragma.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 6 16:38:19 2006 +diff -uNr dmd-0.162/dmd/html/d/pretod.html dmd-0.163/dmd/html/d/pretod.html --- dmd-0.162/dmd/html/d/pretod.html 2006-06-13 16:04:02.000000000 +0200 +++ dmd-0.163/dmd/html/d/pretod.html 2006-07-01 00:48:38.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 13 16:04:02 2006 +diff -uNr dmd-0.162/dmd/html/d/property.html dmd-0.163/dmd/html/d/property.html --- dmd-0.162/dmd/html/d/property.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/property.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:37 2006Last update Tue Jun 6 16:38:19 2006 +diff -uNr dmd-0.162/dmd/html/d/rationale.html dmd-0.163/dmd/html/d/rationale.html --- dmd-0.162/dmd/html/d/rationale.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/rationale.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 6 16:38:20 2006 +diff -uNr dmd-0.162/dmd/html/d/regular-expression.html dmd-0.163/dmd/html/d/regular-expression.html --- dmd-0.162/dmd/html/d/regular-expression.html 2006-06-06 16:38:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/regular-expression.html 2006-07-07 20:47:22.000000000 +0200 @@ -31,7 +31,7 @@ -Last update Sat Jul 1 00:48:39 2006Last update Tue Jun 6 16:38:21 2006 +@@ -226,7 +226,7 @@Last update Fri Jul 7 20:47:20 2006To check for a match of a string s with a regular expression - in Ruby, use the ~= operator, which returns the index of the + in Ruby, use the =~ operator, which returns the index of the first match:
s = "abcabcabab" @@ -297,13 +297,11 @@Or the replacement string can be provided by a delegate:
sub(s, "[ar]", - delegate char[] (RegExp m) - { - return toupper(m.match(0)); - }, + (RegExp m) { return toupper(m.match(0)); }, "g"); // result: StRAp A Rocket engine on A chicken.+(toupper() comes from std.string.)Looping
diff -uNr dmd-0.162/dmd/html/d/statement.html dmd-0.163/dmd/html/d/statement.html --- dmd-0.162/dmd/html/d/statement.html 2006-06-30 00:31:52.000000000 +0200 +++ dmd-0.163/dmd/html/d/statement.html 2006-06-16 13:32:28.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Fri Jun 30 00:31:51 2006 +@@ -160,9 +160,6 @@ VolatileStatement AsmStatement PragmaStatement - -EmptyStatement: - ;Last update Fri Jun 16 13:32:26 2006Labelled Statements
@@ -172,8 +169,7 @@LabelledStatement: - Identifier : Statement - Identifier : EmptyStatement + Identifier ':' StatementAny statement can be labelled, including empty statements, diff -uNr dmd-0.162/dmd/html/d/struct.html dmd-0.163/dmd/html/d/struct.html --- dmd-0.162/dmd/html/d/struct.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/struct.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -
Last update Tue Jun 6 16:38:19 2006 +diff -uNr dmd-0.162/dmd/html/d/template.html dmd-0.163/dmd/html/d/template.html --- dmd-0.162/dmd/html/d/template.html 2006-06-19 18:30:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/template.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Mon Jun 19 18:30:22 2006 +diff -uNr dmd-0.162/dmd/html/d/templates-revisited.html dmd-0.163/dmd/html/d/templates-revisited.html --- dmd-0.162/dmd/html/d/templates-revisited.html 2006-06-13 16:04:04.000000000 +0200 +++ dmd-0.163/dmd/html/d/templates-revisited.html 2006-07-01 00:48:40.000000000 +0200 @@ -33,7 +33,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 13 16:04:03 2006 +diff -uNr dmd-0.162/dmd/html/d/type.html dmd-0.163/dmd/html/d/type.html --- dmd-0.162/dmd/html/d/type.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/type.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:39 2006Last update Tue Jun 6 16:38:19 2006 +diff -uNr dmd-0.162/dmd/html/d/warnings.html dmd-0.163/dmd/html/d/warnings.html --- dmd-0.162/dmd/html/d/warnings.html 2006-06-06 16:38:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/warnings.html 2006-07-01 00:48:40.000000000 +0200 @@ -31,7 +31,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 6 16:38:21 2006 +diff -uNr dmd-0.162/dmd/html/d/wc.html dmd-0.163/dmd/html/d/wc.html --- dmd-0.162/dmd/html/d/wc.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/wc.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:39 2006Last update Tue Jun 6 16:38:20 2006 +diff -uNr dmd-0.162/dmd/html/d/version.html dmd-0.163/dmd/html/d/version.html --- dmd-0.162/dmd/html/d/version.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/version.html 2006-07-01 00:48:40.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sat Jul 1 00:48:39 2006Last update Tue Jun 6 16:38:20 2006 +diff -uNr dmd-0.162/dmd/html/d/windbg.html dmd-0.163/dmd/html/d/windbg.html --- dmd-0.162/dmd/html/d/windbg.html 2006-06-06 16:38:22.000000000 +0200 +++ dmd-0.163/dmd/html/d/windbg.html 2006-07-01 00:48:40.000000000 +0200 @@ -31,7 +31,7 @@ -Last update Sat Jul 1 00:48:38 2006Last update Tue Jun 6 16:38:21 2006 +diff -uNr dmd-0.162/dmd/html/d/windows.html dmd-0.163/dmd/html/d/windows.html --- dmd-0.162/dmd/html/d/windows.html 2006-06-06 16:38:20.000000000 +0200 +++ dmd-0.163/dmd/html/d/windows.html 2006-07-01 00:48:40.000000000 +0200 @@ -31,7 +31,7 @@ -Last update Sat Jul 1 00:48:39 2006Last update Tue Jun 6 16:38:20 2006 +Last update Sat Jul 1 00:48:38 2006