Reading bool as the string "true" or "false"

Ali Cehreli acehreli at yahoo.com
Fri Jul 31 21:57:11 PDT 2009


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




More information about the Digitalmars-d mailing list