import std.stdio; import std.datetime; void arg_demo(string[] args) { int argc = 0, total = 0; foreach(arg; args) { printf("arg[%i] = \"%s\"\n", argc++, arg.ptr); } write("\nargs = ", argc, "\ntotal = ", total, "\n\n"); } void ascii_demo() { char c; for(c = ' '; c < 128; ) { write(c); if(++c % 32 == 0) write('\n'); } write('\n'); } void print_datetime() { SysTime now = Clock.currTime(); writeln(now.toISOExtString()); } void main(string[ ] args) { arg_demo(args); ascii_demo(); print_datetime(); }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more