by Gazler · 14y ago · 0 comments
It says:
Go also provides a shorter syntax for creating arrays:
x := [5]float64{ 98, 93, 77, 82, 83 }
We no longer need to specify the type because Go can figure it out. Sometimes arrays like this can get too long to fit on one line, so Go allows you to break it up like this:
However the type is specified as `float64`
var x [5]float64 = [5]float64{ 98, 93, 77, 82, 83 }
But I explained ":=" earlier so I can see how that would be confusing.
float64 myfloat64array[] = new(float64[5], ...)