FAQ
Hello,

I recently wanted to use the function Pow10 (see here : func Pow10(e int)
float64 <http://golang.org/pkg/math/#Pow10>)

package main
import (
"fmt"
"math")
func main() {
fmt.Println("%g", Pow10(2))
}

  I tried this super simple code, from my laptop first and then from the
online "play" area on Golang website. I get an error

# command-line-arguments
/tmp/sandbox749951716/main.go:5: imported and not used: "math"
/tmp/sandbox749951716/main.go:8: undefined: Pow10
Program exited.


I just don't understand why, maybe I am tired. What am I missing ?

Thank you.

--
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Michael Jones at Jul 21, 2015 at 11:29 pm
    math.Pow10(2)


    Michael Jones, CEO • michael@wearality.com • +1 650 656-6989
    Wearality Corporation • 289 S. San Antonio Road • Los Altos, CA 94022
    On Jul 21, 2015, at 4:28 PM, Stéphane phenetas wrote:

    Hello,

    I recently wanted to use the function Pow10 (see here : func Pow10(e int) float64 <http://golang.org/pkg/math/#Pow10>)

    package main
    import (
    "fmt"
    "math")
    func main() {
    fmt.Println("%g", Pow10(2))
    }

    I tried this super simple code, from my laptop first and then from the online "play" area on Golang website. I get an error

    # command-line-arguments
    /tmp/sandbox749951716/main.go:5: imported and not used: "math"
    /tmp/sandbox749951716/main.go:8: undefined: Pow10

    Program exited.

    I just don't understand why, maybe I am tired. What am I missing ?

    Thank you.

    --
    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 golang-nuts+unsubscribe@googlegroups.com For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Stéphane phenetas at Jul 21, 2015 at 11:40 pm
    I AM really tired :X

    So obvious. Thank you very much.

    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJul 21, '15 at 11:28p
activeJul 21, '15 at 11:40p
posts3
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase