January 09, 2004
With scanf you can't use the scanf result in D case !?!?!?


import std.c.stdio;

char[80] name;

printf("Yo! What's your name? ");
scanf("%s", &name);
printf("\nHey, %.*s, ", name);

// Give name, example John -> Never go in right Case (always Default!!!)

switch(name)
{
case "John":
printf("JOHN IS THE NAME!\n");
break;
case "Bill":
printf("BILL IS THE NAME!\n");
break;
case "Cindy":
printf("CINDY IS THE NAME!\n");
break;
default:
printf("Nobody\n");
}