From 363613d951130e237cb0fe95e098265b64be2d65 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Mon, 5 Nov 2012 11:02:32 -0800 Subject: [PATCH] 58 chars. ref #27 --- examples/constants/constants.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/constants/constants.go b/examples/constants/constants.go index 05da85a..76f59c1 100644 --- a/examples/constants/constants.go +++ b/examples/constants/constants.go @@ -11,19 +11,22 @@ const s string = "constant" func main() { fmt.Println(s) - // A `const` statement can appear anywhere a `var` statement can. + // A `const` statement can appear anywhere a `var` + // statement can. const n = 500000000 - // Constant expressions perform arithmetic with arbitrary precision. + // Constant expressions perform arithmetic with + // arbitrary precision. const d = 3e20 / n - // A numeric constant has no type until it's given one, such as by - // an explicit cast. + // A numeric constant has no type until it's given + // one, such as by an explicit cast. fmt.Println(int64(d)) - // A number can also be given a type by using it in a context that - // requires one, such as a variable assignment or function call. - // The type it gets depends on its value. + // A number can also be given a type by using it in a + // context that requires one, such as a variable + // assignment or function call. The type it gets + // depends on its value. fmt.Println(n) // int fmt.Println(d) // float64 }