Two little blog/tutorials posts.
kb3ctd2 at yahoo.com
Mon Feb 27 20:21:13 PST 2006
"Alan Knowles" <alan at akbhome.com> wrote in message
news:du0d5a$5j0$1 at digitaldaemon.com...
> I'm sure they are lacking in many ways, but feel free to post
> comments/corrections ;)
Oh, you poor man! Writing code like you're still in C! This is D we're
talking about here.
int main(char args)
writefln("args.length = ", args.length);
for (int i = 0; i < args.length; i++)
// Still a good idea to use the %s, so it doesn't escape the arg
writefln("args[", i, "] = '%s'", args[i]);
foreach (uint i, char arg; args)
writefln("args[", i, "] = '%s'", arg);
Also, this isn't valid code:
char[char] testarray =
There are no associative array initializers yet. In fact, there are no
non-static array initializers (dumb, I know). They've been proposed, but
they don't exist.
More information about the Digitalmars-d-learn