Am I doing it wrong?

Emil Madsen sovende at gmail.com
Sun Oct 3 04:52:39 PDT 2010


perfect :), thanks :)

On 3 October 2010 13:39, Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> 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
>



-- 
// Yours sincerely
// Emil 'Skeen' Madsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101003/c96f2b3a/attachment.html>


More information about the Digitalmars-d mailing list