mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
correctly rounded floating-point conversions
in new package strconv. move atoi etc to strconv too. update fmt, etc to use strconv. R=r DELTA=2232 (1691 added, 424 deleted, 117 changed) OCL=19286 CL=19380
This commit is contained in:
parent
f333f4685c
commit
079c00a475
24 changed files with 1819 additions and 530 deletions
|
|
@ -10,7 +10,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"strings";
|
||||
"strconv";
|
||||
)
|
||||
|
||||
func f(left, right *chan int) {
|
||||
|
|
@ -21,7 +21,7 @@ func main() {
|
|||
var n = 10000;
|
||||
if sys.argc() > 1 {
|
||||
var ok bool;
|
||||
n, ok = strings.atoi(sys.argv(1));
|
||||
n, ok = strconv.atoi(sys.argv(1));
|
||||
if !ok {
|
||||
print("bad arg\n");
|
||||
sys.exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue