Files
wren/test/language/break/nested_while_loop.wren
Bob Nystrom 78655c68b0 Simple string interpolation.
This allows "%(...)" inside a string literal to interpolate the
stringified result of an expression.

It doesn't support custom interpolators or format strings, but we can
consider extending that later.
2015-11-11 07:55:48 -08:00

26 lines
361 B
Plaintext

var i = 0
while (true) {
System.print("outer %(i)")
if (i > 1) break
var j = 0
while (true) {
System.print("inner %(j)")
if (j > 1) break
j = j + 1
}
i = i + 1
}
// expect: outer 0
// expect: inner 0
// expect: inner 1
// expect: inner 2
// expect: outer 1
// expect: inner 0
// expect: inner 1
// expect: inner 2
// expect: outer 2