delve/_fixtures/testnextprog.go
Derek Parker 6a71009954 Fix Next impl
Needs some refactoring and some optimization, but fixes several bugs.
2014-10-09 14:19:10 -05:00

44 lines
419 B
Go

package main
import (
"fmt"
"runtime"
"time"
)
func sleepytime() {
time.Sleep(time.Nanosecond)
}
func helloworld() {
fmt.Println("Hello, World!")
}
func testnext() {
var (
j = 1
f = 2
)
for i := 0; i <= 5; i++ {
j += j * (j ^ 3) / 100
if i == f {
fmt.Println("foo")
break
}
helloworld()
}
helloworld()
}
func main() {
runtime.LockOSThread()
for {
sleepytime()
testnext()
}
}