Am I doing it wrong?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Oct 3 04:39:04 PDT 2010
On Sunday 03 October 2010 04:34:31 Emil Madsen wrote:
> can the enum be a float? if calcprimes returned a float? - and if so, will
> the enum be a float or an int? (will it be casted, or will it work as an
> auto type?)
auto, enum, immutable, and const all use type inference. So, you can declare
auto a = 7;
enum b = 7.7;
immutable c = "hello";
const d = false;
enum, however, is the only one which is a compile-time constant.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list