Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
April 24, 2015 How to output ascii character using terminal.d | ||||
---|---|---|---|---|
| ||||
How do I output a single ascii character specified numerically, via terminal.d's writef() function which expects a string? Bound to be something obvious but I just can't see it atm! Paul |
April 24, 2015 Re: How to output ascii character using terminal.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | Try terminal.writef("%s", cast(char) your_ascii_character); it should work. |
April 24, 2015 Re: How to output ascii character using terminal.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Friday, 24 April 2015 at 15:46:15 UTC, Adam D. Ruppe wrote:
> Try terminal.writef("%s", cast(char) your_ascii_character); it should work.
Thank you, it works for the standard ascii characters but not the extended set - maybe that has something to do with my terminal settings...? (not that I know how to change them anyway!)
Paul
|
April 24, 2015 Re: How to output ascii character using terminal.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul | Also try cast(dchar) instead of cast(char), that might do what you need. |
April 25, 2015 Re: How to output ascii character using terminal.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Friday, 24 April 2015 at 22:21:16 UTC, Adam D. Ruppe wrote: > Also try cast(dchar) instead of cast(char), that might do what you need. a look at this https://github.com/cassio2014/DIC |
Copyright © 1999-2021 by the D Language Foundation