Files
moxa/_test/a24.go
Marc Vertes 4d8e990ff3 fix: several bug fixes so bcrypt and blowfish work in yaegi (#182)
* convert type of nil value
* range staement with key and no value
* assign operators misbehave
* reset to zero in value spec statements
2019-05-07 14:01:55 +02:00

23 lines
307 B
Go

package main
import "fmt"
func main() {
for i := 0; i < 2; i++ {
var buf [8]byte
var x int
fmt.Println(buf, x)
for i := range buf {
buf[i] = byte(i)
x = i
}
fmt.Println(buf, x)
}
}
// Output:
// [0 0 0 0 0 0 0 0] 0
// [0 1 2 3 4 5 6 7] 7
// [0 0 0 0 0 0 0 0] 0
// [0 1 2 3 4 5 6 7] 7