diff options
Diffstat (limited to 'src/pkg/strconv/atoi.go')
-rw-r--r-- | src/pkg/strconv/atoi.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pkg/strconv/atoi.go b/src/pkg/strconv/atoi.go index 2d0db7155..cbf0380ec 100644 --- a/src/pkg/strconv/atoi.go +++ b/src/pkg/strconv/atoi.go @@ -142,9 +142,11 @@ Error: // // The errors that ParseInt returns have concrete type *NumError // and include err.Num = s. If s is empty or contains invalid -// digits, err.Err = ErrSyntax; if the value corresponding -// to s cannot be represented by a signed integer of the -// given size, err.Err = ErrRange. +// digits, err.Err = ErrSyntax and the returned value is 0; +// if the value corresponding to s cannot be represented by a +// signed integer of the given size, err.Err = ErrRange and the +// returned value is the maximum magnitude integer of the +// appropriate bitSize and sign. func ParseInt(s string, base int, bitSize int) (i int64, err error) { const fnParseInt = "ParseInt" |