mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
add printf to fmt.
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
This commit is contained in:
parent
689b28fd96
commit
418b97c670
5 changed files with 401 additions and 8 deletions
|
|
@ -151,7 +151,7 @@ func ValueToString(val Value) string {
|
|||
return val.(StringValue).Get();
|
||||
case PtrKind:
|
||||
v := val.(PtrValue);
|
||||
return TypeToString(typ, false) + "(" + integer(int64(v.Indirect())) + ")";
|
||||
return TypeToString(typ, false) + "(" + integer(int64(v.Get())) + ")";
|
||||
case ArrayKind:
|
||||
t := typ.(ArrayType);
|
||||
v := val.(ArrayValue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue