Am I doing it wrong?
Simen kjaeraas
simen.kjaras at gmail.com
Sun Oct 3 16:24:18 PDT 2010
Jérôme M. Berger <jeberger at free.fr> wrote:
> 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?)
>>
> Yes, basically "enum" is a synonym for "compile-time const auto"
> (although the "auto" part can be replaced by an explicit type).
Or, you know, just "compile-time const", as the lack of a specified type,
and const being a storage class, allows for type inference. Auto is not
necessary.
--
Simen
More information about the Digitalmars-d
mailing list