Files
wren/test/language/while/syntax.wren

17 lines
227 B
Plaintext
Raw Permalink Normal View History

2013-11-17 22:38:59 -08:00
// Single-expression body.
var c = 0
while (c < 3) System.print(c = c + 1)
2013-11-17 22:38:59 -08:00
// expect: 1
// expect: 2
// expect: 3
// Block body.
var a = 0
while (a < 3) {
System.print(a)
a = a + 1
2013-11-17 22:38:59 -08:00
}
// expect: 0
// expect: 1
// expect: 2