Files
wren/test/language/if/else.wren
T

7 lines
292 B
Plaintext
Raw Normal View History

2014-01-20 18:12:55 -08:00
// Evaluate the 'else' expression if the condition is false.
2015-09-15 07:46:09 -07:00
if (true) System.print("good") else System.print("bad") // expect: good
if (false) System.print("bad") else System.print("good") // expect: good
2014-01-20 18:12:55 -08:00
// Allow block body.
2015-09-15 07:46:09 -07:00
if (false) null else { System.print("block") } // expect: block