Non-decimal radices/Convert: Difference between revisions
Content added Content deleted
m (fix bare lang tag) |
|||
Line 491: | Line 491: | ||
=={{header|Go}}== |
=={{header|Go}}== |
||
<lang go> |
<lang go>package main |
||
import ( |
|||
⚫ | |||
"fmt" |
|||
⚫ | |||
"math/big" |
|||
"strconv" |
|||
) |
|||
func main () { |
|||
⚫ | |||
fmt.Println(s) |
|||
⚫ | |||
if err == nil { |
|||
fmt.Println(i) |
|||
} |
|||
b, ok := new(big.Int).SetString("1a", 16) // returns the big integer 26 |
|||
if ok { |
|||
fmt.Println(b) |
|||
} |
|||
}</lang> |
|||
=={{header|Groovy}}== |
=={{header|Groovy}}== |