digitalmars.D.bugs - minor
- bobef (15/15) Feb 24 2006 ============= a.d ================
- Jarrett Billingsley (6/21) Feb 24 2006 Yeah, I hate this too. I don't know why there aren't overloads for the
- Jarrett Billingsley (3/23) Feb 24 2006 BTW, you can just use 16u as the radix in this case instead of cast(uint...
- bobef (3/29) Feb 24 2006 My point was that it complains even after I tell it that 1 is long and
============= a.d ================ import std.string; void main() { char[] a=std.string.toString(cast(long)(1),16); //error char[] b=std.string.toString(cast(long)(1),cast(uint)16); //no error } /* a.d(5): function std.string.toString called with argument types: (long,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) */
Feb 24 2006
"bobef" <bobef lessequal.com> wrote in message news:dtmn97$154e$1 digitaldaemon.com...============= a.d ================ import std.string; void main() { char[] a=std.string.toString(cast(long)(1),16); //error char[] b=std.string.toString(cast(long)(1),cast(uint)16); //no error } /* a.d(5): function std.string.toString called with argument types: (long,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) */Yeah, I hate this too. I don't know why there aren't overloads for the radix toString() for types other than long and ulong. Especially when you do it on an int and it gets sign-extended so you get something like FFFFFFFFFE0385AF
Feb 24 2006
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message news:dtnq6q$h80$1 digitaldaemon.com..."bobef" <bobef lessequal.com> wrote in message news:dtmn97$154e$1 digitaldaemon.com...BTW, you can just use 16u as the radix in this case instead of cast(uint)16.============= a.d ================ import std.string; void main() { char[] a=std.string.toString(cast(long)(1),16); //error char[] b=std.string.toString(cast(long)(1),cast(uint)16); //no error } /* a.d(5): function std.string.toString called with argument types: (long,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) */
Feb 24 2006
Jarrett Billingsley wrote:"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message news:dtnq6q$h80$1 digitaldaemon.com...My point was that it complains even after I tell it that 1 is long and there are no two cases for the second argument..."bobef" <bobef lessequal.com> wrote in message news:dtmn97$154e$1 digitaldaemon.com...BTW, you can just use 16u as the radix in this case instead of cast(uint)16.============= a.d ================ import std.string; void main() { char[] a=std.string.toString(cast(long)(1),16); //error char[] b=std.string.toString(cast(long)(1),cast(uint)16); //no error } /* a.d(5): function std.string.toString called with argument types: (long,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) */
Feb 24 2006