Hello,

I'm now rereading post "Constants" and in the last section "Numbers" there 
is a text

BEGINNING
Therefore, although they have different implicit default types, written as 
untyped constants they can be assigned to a variable of any integer type:

var f float32 = 1
var i int = 1.000
var u uint32 = 1e3 - 99.0*10.0 - 9
var c float64 = '\x01'
var p uintptr = '\u0001'
var r complex64 = 'b' - 'a'
var b byte = 1.0 + 3i - 3.0i

fmt.Println(f, i, u, c, p, r, b)
END

I guess it should say "any number type", but I'm not 100% sure. Am I right?

Kamil

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6d4d809b-7165-4843-8edf-474fcb7fb14bn%40googlegroups.com.

Reply via email to