code blockd IDE

Anders F Björklund afb at algonet.se
Thu Jan 18 00:48:55 PST 2007


Stan Brown wrote:

> You have to use the nightly build of Code::Blocks to get D support.
> Currently it only has one D wizard that creates a D application.

The wizards could use some love, as they're still using previous D:

int main(char[][] args)
{
     printf("hello world\n");
     printf("args.length = %d\n", args.length);
     for (int i = 0; i < args.length; i++)
         printf("args[%d] = '%s'\n", i, cast(char *)args[i]);
     return 0;
}

Converting that over to writef and foreach would probably be nice ?

import std.stdio;

void main(char[][] args)
{
     writefln("hello world");
     writefln("args.length = ", args.length);
     foreach(int i, char[] arg; args)
         writefln("args[%d]", i, " = '%s'", arg);
}

Even better would be if printf could just go back to std.c.stdio...

--anders



More information about the Digitalmars-d mailing list