About string and int spliced together.
Nick Treleaven
nick at geany.org
Fri Jun 19 11:09:56 UTC 2020
On Thursday, 18 June 2020 at 09:13:53 UTC, Dennis wrote:
> On Thursday, 18 June 2020 at 09:00:42 UTC, zoujiaqing wrote:
>> Type should be automatically converted to string!
>
> While this could be made to work for floating point numbers, it
> is ambiguous for integers since integers are often implicitly
> convertible to characters:
>
> writeln("AB"~67); // prints "ABC", code unit 67 represents 'C'
This is actually an open issue (someone filed it as a duplicate
of a more subtle bug though):
https://issues.dlang.org/show_bug.cgi?id=18346
More information about the Digitalmars-d
mailing list