blob: f15468468094999eb01214ab9fabf3add5198755 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
// expect: 100/5/
// spec 4.6: the loop variable's scope is the loop (an outer i is untouched)
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
int i = 100;
int last = 0;
for (int i = 0; i < 6; i++) last = i;
pn(i); pn(last);
return 0;
}
|