Re: Converting int to dchar?

2016-07-31 Thread Darren via Digitalmars-d-learn
That's a really informative response. Thank you!

Re: Converting int to dchar?

2016-07-31 Thread Johannes Loher via Digitalmars-d-learn
Am 31.07.2016 um 23:46 schrieb Seb: > On Sunday, 31 July 2016 at 21:31:52 UTC, Darren wrote: >> Hey, all. >> >> I'm pretty much a programming novice, so I hope you can bear with me. >> Does anyone know how I can change an int into a char equivalent? >> >> e.g. >> int i = 5; >> dchar value; >>

Re: Converting int to dchar?

2016-07-31 Thread ag0aep6g via Digitalmars-d-learn
On 07/31/2016 11:31 PM, Darren wrote: If I try and cast it to dchar, I get messed up output, Because it gives you a dchar with the numeric value 5 which is some control character. and I'm not sure how to use toChars (if that can accomplish this). value = i.toChars.front; toChars

Re: Converting int to dchar?

2016-07-31 Thread Seb via Digitalmars-d-learn
On Sunday, 31 July 2016 at 21:31:52 UTC, Darren wrote: Hey, all. I'm pretty much a programming novice, so I hope you can bear with me. Does anyone know how I can change an int into a char equivalent? e.g. int i = 5; dchar value; ? assert(value == '5'); If I try and cast it to dchar, I