- changed title to `readf` can read bool now
`readf` can work with bool
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)
-
Account Deleted reporter -
Account Deleted reporter - changed title to `readf` can work with bool
-
repo owner Thank you Lj Chen,
I will rephrase that section soon.
Ali
-
repo owner - changed status to resolved
fixes
#4, readf() does convert strings "false" and "true" to false and true values→ <<cset 62a20a48b8b6>>
-
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
-
Account Deleted reporter Yes, "Lejia Chen" please.
Thanks.
-
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.
-
repo owner - changed status to closed
- Log in to comment