| Age | Commit message (Collapse) | Author |
|
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
|
|
R=rsc
DELTA=38 (14 added, 10 deleted, 14 changed)
OCL=19242
CL=19242
|
|
also add code to print (pointers to) arrays, through %v.
R=rsc
DELTA=108 (70 added, 33 deleted, 5 changed)
OCL=19184
CL=19192
|
|
R=r
OCL=18685
CL=18685
|
|
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=18682
CL=18684
|
|
R=rsc
DELTA=100 (70 added, 10 deleted, 20 changed)
OCL=18663
CL=18669
|
|
R=rsc
DELTA=31 (9 added, 6 deleted, 16 changed)
OCL=18470
CL=18472
|
|
Plus print[ln] with the ability to print struct values.
Note for language mavens: if a "..." function passes its argument
to another "..." function, the argument is not wrapped again. This
allows printf to call fprintf without extra manipulation. It's good
but needs to go in the spec.
This code works:
///
package main
import fmt "fmt"
import os "os"
type T struct { s string; a, b int }
func main() {
P := fmt.Printer();
P.printf("%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println("hi there", 7, 123.456);
P.fprintf(os.Stdout, "%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println(T{"x", 7, 234}, "end of struct", 8, 9);
}
R=rsc
DELTA=28 (7 added, 3 deleted, 18 changed)
OCL=18321
CL=18324
|
|
1) bool wasn't handled (added '%t' for 'truth').
2) float64 had a typo.
TBR=rsc
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=18314
CL=18318
|
|
R=rsc
DELTA=9 (6 added, 0 deleted, 3 changed)
OCL=18072
CL=18075
|
|
R=r
DELTA=202 (60 added, 24 deleted, 118 changed)
OCL=18029
CL=18038
|
|
R=r
OCL=18024
CL=18024
|
|
R=rsc
DELTA=14 (13 added, 0 deleted, 1 changed)
OCL=17858
CL=17867
|
|
uses reflection to determine arguments.
for now, the arguments must be provided as a struct; the compiler
will soon do the packaging automatically for "..." parameters.
R=rsc
DELTA=1436 (909 added, 520 deleted, 7 changed)
OCL=17823
CL=17831
|
|
some build dependencies need rearrangement because fmt will depend on reflect
R=rsc
DELTA=1091 (567 added, 521 deleted, 3 changed)
OCL=17792
CL=17796
|