Skip to content

Commit e55175f

Browse files
committed
examples: no longer use printf in the coroutines example
1 parent 0810e84 commit e55175f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/coroutines/simple_coroutines.v

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import net.http
88

99
fn foo(a int) {
1010
for {
11-
// println('hello from foo()') // a=${a}')
12-
C.printf(c'hello from foo() a=%d\n', a)
11+
println('1hello from foo() a=${a}')
12+
//C.printf(c'hello from foo() a=%d\n', a)
1313
coroutines.sleep(1 * time.second)
1414
}
1515
}
1616

1717
fn foo2(a int) {
1818
mut i := 0
1919
for {
20-
// println('hello from foo2()') // a=${a}')
21-
C.printf(c'hello from foo2() a=%d\n', a)
20+
println('hello from foo2() a=${a}')
21+
//C.printf(c'hello from foo2() a=%d\n', a)
2222
coroutines.sleep(2 * time.second)
2323
i++
2424
// resp := http.get('https://vlang.io/utc_now') or { panic(err) }
@@ -32,16 +32,16 @@ fn foo2(a int) {
3232

3333
fn foo3(a int) {
3434
for {
35-
// println('hello from foo3()') // a=${a}')
36-
C.printf(c'hello from foo3() a=%d\n', a)
35+
println('hello from foo3() a=${a}')
36+
//C.printf(c'hello from foo3() a=%d\n', a)
3737
coroutines.sleep(3 * time.second)
3838
}
3939
}
4040

4141
fn foo4(a int) {
4242
for {
43-
// println('hello from foo4()') // a=${a}')
44-
C.printf(c'hello from foo4() a=%d\n', a)
43+
println('hello from foo4() a=${a}')
44+
//C.printf(c'hello from foo4() a=%d\n', a)
4545
coroutines.sleep(3 * time.second)
4646
}
4747
}

0 commit comments

Comments
 (0)