You misunderstood the question, i didn't ask "what", i asked "why" :)

I know what are the literals.

Again the question is...
Why "3" is "especially" an "int=int32"?
Why "0.3" is "especially" a "double=float64"?

Thanks.

On Sun, 28 Mar 2010 16:08:27 +0400, Robert Clipsham <[email protected]> wrote:

On 28/03/10 12:02, so wrote:
Hello, after a little discussion on D.learn, i better ask this here
since i didn't get much replies.
Two lil questions.

Why "3" is an int?
Why "0.3" is a double?

Thanks!

This should help you understand:
http://digitalmars.com/d/2.0/lex.html#integerliteral

If you scroll down from there you'll also see what counts as a floating point literal and why.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to