noob question

BCS ao at pathlink.com
Thu Aug 6 10:11:24 PDT 2009


Reply to llltattoolll,

>   writefln ("Your age is %d? \t YES \t NO", _age ); /* here is my second 
problem, can´t into the response and program*/
>   _response = readln(); /* show me else line always */

// if all else fails, what are you getting
writef(">>%s<<\n", cast(ubyte[])chomp(_response));

// might it be a case error? "YES" vs. "yes"?

>   if ( chomp(_response) == "yes") 
>     writefln ("thank you %s", _name );
>   else
>     writefln ("Sorry %s you have %d", _name, _age - 1 ); /* this line always 
show me because can´t validate _response */




More information about the Digitalmars-d-learn mailing list