www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Reading bool as the string "true" or "false"

reply Ali Cehreli <acehreli yahoo.com> writes:
If the default behavior for dout.writefln is to print bool values as the "true"
and "false" strings, then the opposite should be available and arguably be the
default:

  // "true" and "false" should be acceptable inputs:
  bool b;
  din.readf(&b);

Am I wrong?

Thanks,
Ali

P.S. There hasn't been any responses to the same question that I asked at the
.learn forum:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=17291
Jul 31 2009
parent Robert Fraser <fraserofthenight gmail.com> writes:
Ali Cehreli wrote:
 If the default behavior for dout.writefln is to print bool values as the
"true" and "false" strings, then the opposite should be available and arguably
be the default:
 
   // "true" and "false" should be acceptable inputs:
   bool b;
   din.readf(&b);
 
 Am I wrong?
 
 Thanks,
 Ali
 
 P.S. There hasn't been any responses to the same question that I asked at the
.learn forum:
 
 http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=17291

Open a bug; the newgroups aren't the right place for this. Thanks!
Aug 01 2009