comparison graal/com.oracle.truffle.sl.test/tests/LoopPrint.sl @ 13836:64c77f0577bb

More documentation and improvements of Simple Language
author Christian Wimmer <christian.wimmer@oracle.com>
date Thu, 30 Jan 2014 17:53:27 -0800
parents b16ec83edc73
children afd6fa5e8229
comparison
equal deleted inserted replaced
13835:67e4e7f56911 13836:64c77f0577bb
1 function main() { 1 function loop(n) {
2 i = 0; 2 i = 0;
3 while (i < 1000) { 3 while (i < n) {
4 i = i + 1; 4 i = i + 1;
5 } 5 }
6 println(i); 6 return i;
7 } 7 }
8
9 function main() {
10 println(loop(1000));
11 }