`readf` can work with bool

Issue #4 closed
Former user created an issue

http://ddili.org/ders/d.en/logical_expressions.html#ix_logical_expressions.input, bool

All of the bool values above are automatically printed as "false" or "true". It is not the case in the opposite direction: the strings "false" and "true" are not automatically read as the values false and true. For that reason, the input must be first read as a string and then be converted to a bool value.

Recently I read this, and found that I can read bool by using readf. Looks this problem has been fixed in https://issues.dlang.org/show_bug.cgi?id=11698.

Comments (8)

  1. acehreli repo owner

    Please let me know if you would like your name to appear differently from "Lj Chen" in the acknowledgements section.

    Thank you, Ali

  2. Former user Account Deleted reporter

    Sorry to trouble you again, please use "Chen Lejia". (Actually I am Chinese, I found it is correct to put my last name first after searching.)

    Thanks.

  3. Log in to comment