Sign in
go
/
website
/
9bc7ea507e11e3e7b5cc7b8c6ce2706f83af39c3
/
.
/
_content
/
blog
/
constants
/
float1.go
blob: 96b3bb9227d2b98ede3d8f54da765e56835a8ff6 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import "fmt"
func main() {
// START OMIT
type MyFloat64 float64
const Zero = 0.0
const TypedZero float64 = 0.0
var mf MyFloat64
mf = 0.0
// OK
mf = Zero
// OK
mf = TypedZero
// Bad
fmt.Println(mf)
// STOP OMIT
}