Should you be able to initialize a float with a char?

max haughton maxhaton at gmail.com
Wed May 18 22:11:34 UTC 2022


For example:

float x = 'a';

Currently compiles. I had no idea that it does but I was 
implementing this pattern in SDC and lo and behold it does (and 
thus sdc has to support it).

Should it? Implicit conversions and implicit-anything around 
floats seem to be very undocumented in the specification too.



More information about the Digitalmars-d mailing list