Hacker News new | ask | show | jobs
by aidanf 4020 days ago
Thanks :) The REPL example with the error has a deliberate typo (int instead of Int) to show how multi-line editing works in the REPL - is that the part you're asking about?
1 comments

I was referring to this:

$ swift Welcome to Swift! Type :help for assistance. 1> 3.14 * 2.5 * 2.5 $R0: Double = 19.625 2> println("The area of the circle is \($R0)") The area of the circle is 19.625 3> 4> $R0 * 2 $R1: Double = 39.25 5> println("And double that is \($R1)") And double that is 39.25 6>

What's Double? Trying to follow this (which didn't make sense to me because I didn't know the history stuff was there) simply caused error messages.

Isn't Double just a bigger floating point number?
Right. A double has twice the precision of a float (hence the name). It's also the default floating point data type in Swift.