leaving golden.out alone for now.
R=ken
DELTA=13 (0 added, 0 deleted, 13 changed)
OCL=21682
CL=21682
func New() *Vector {
v := new(*Vector);
v.nelem = 0;
- v.elem = new(*[10]Element);
+ v.elem = new([10]Element);
return v;
}
func main() {
var ta []*T;
- ta = new(*[1]*T);
+ ta = new([1]*T);
ta[0] = nil;
}
/*
func main() {
v := new(*Vector);
- v.elem = new(*[10]Element);
+ v.elem = new([10]Element);
t := new(*TStruct);
t.name = "hi";
v.elem[0] = t;
func main() {
m := new(map[string] []string);
- as := new(*[2]string);
+ as := new([2]string);
as[0] = "0";
as[1] = "1";
m["0"] = as;
func main() {
if len(a) != 2 { panicln("len a", len(a)) }
if len(b) != 5 { panicln("len b", len(b)) }
- if len(c) != 1 { panicln("len a", len(a)) }
+ if len(c) != 1 { panicln("len a", len(c)) }
}
testpdpf1()
{
a := new(*[40]int);
- setpd(a);
- res(sumpd(a), 0, 40);
+ setpd(*a);
+ res(sumpd(*a), 0, 40);
- b := a[5:30];
+ b := (*a)[5:30];
res(sumpd(b), 5, 30);
}
c = peekc;
peekc = -1;
} else {
- c = convert(int, input[inputindex]);
+ c = int(input[inputindex]);
inputindex++;
if c == '\n' {
lineno = lineno + 1;
break;
default:
for i = 0; i < 100 - 1; { // sizeof tokenbuf - 1
- tokenbuf[i] = convert(byte, c);
+ tokenbuf[i] = byte(c);
i = i + 1;
c = Get();
if c == EOF {
{
var v int = 0;
for i := 0; i < tokenlen && '0' <= tokenbuf[i] && tokenbuf[i] <= '9'; i = i + 1 {
- v = 10 * v + convert(int, tokenbuf[i] - '0');
+ v = 10 * v + int(tokenbuf[i] - '0');
}
return v;
}
z2[0] = 'a';
z2[1] = 'b';
z2[2] = 'c';
- c = string(z2);
+ c = string(*z2);
if c != "abc" {
panic("create array pointer ", c);
}
}
for i := 0; i < v.Len(); i++ {
- x := convert(*S, v.At(i));
+ x := v.At(i).(*S);
if x.val != v.Len() - i - 1 {
panic("expected ", i, ", found ", x.val, "\n");
}