Array operations -- not actually so difficult
Kirk McDonald
kirklin.mcdonald at gmail.com
Fri Dec 15 12:00:01 PST 2006
Bill Baxter wrote:
> I put it on my D Rants page[1], but I don't think I ever filed it as a bug.
>
> [1] http://www.prowiki.org/wiki4d/wiki.cgi?BillBaxter
>
> --bb
On that page:
-----
It should be possible to set the init property for a typedef'ed or other
user defined type. E.g.
typedef int myint;
myint.init = -1;
-----
You can do this:
import std.stdio;
typedef int INT = 20;
void main() {
INT i;
writefln(i); // prints 20
}
--
Kirk McDonald
Pyd: Wrapping Python with D
http://pyd.dsource.org
More information about the Digitalmars-d
mailing list