1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00
R=r
OCL=18034
CL=18034
This commit is contained in:
Ken Thompson 2008-10-29 14:09:32 -07:00
parent 915e809f86
commit 9eebfe6c3b
2 changed files with 9 additions and 8 deletions

View File

@ -6,29 +6,29 @@
package main
var b[10] float;
var b[10] float32;
func
main()
{
var a[10] float;
var a[10] float32;
for i:=short(5); i<10; i=i+1 {
a[i] = float(i);
for i:=int16(5); i<10; i=i+1 {
a[i] = float32(i);
}
s1 := float(0);
s1 := float32(0);
for i:=5; i<10; i=i+1 {
s1 = s1 + a[i];
}
if s1 != 35 { panic(s1); }
for i:=short(5); i<10; i=i+1 {
b[i] = float(i);
for i:=int16(5); i<10; i=i+1 {
b[i] = float32(i);
}
s2 := float(0);
s2 := float32(0);
for i:=5; i<10; i=i+1 {
s2 = s2 + b[i];
}

View File

@ -7,6 +7,7 @@
package main
type vlong int64;
type short int16;
func
main()