a : number
a = A;
b:number = B
+ print "still", bigger // check for regression in scoping
if a > 0 and b > 0:
while a != b:
if a < b:
Hello World, what lovely oceans you have!
Is 55 bigger than 33 ? yes
double 33 is 66
+ still yes
GCD of 55 and 33 is 11
Fibonacci: 1 1 2 3 5 8 13 21 34 55 89 144
hello was the str
Hello World, what lovely oceans you have!
Is 12 bigger than 60 ? no
double 60 is 120
+ still no
GCD of 12 and 60 is 12
Fibonacci: 1 1 2 3 5 8 13 21 34 55 89 144
I found the str over there
enclosed the declaration, and that has closed.
- "conditionally in scope". The "in scope" block and all parallel
- scopes have closed, and no further mention of the name has been
- seen. This state includes a secondary nest depth which records the
- outermost scope seen since the variable became conditionally in
- scope. If a use of the name is found, the variable becomes "in
- scope" and that secondary depth becomes the recorded scope depth.
- If the name is declared as a new variable, the old variable becomes
- "out of scope" and the recorded scope depth stays unchanged.
+ scopes have closed, and no further mention of the name has been seen.
+ This state includes a secondary nest depth (`min_depth`) which records
+ the outermost scope seen since the variable became conditionally in
+ scope. If a use of the name is found, the variable becomes "in scope"
+ and that secondary depth becomes the recorded scope depth. If the
+ name is declared as a new variable, the old variable becomes "out of
+ scope" and the recorded scope depth stays unchanged.
- "out of scope". The variable is neither in scope nor conditionally
in scope. It is permanently out of scope now and can be removed from
(v->scope == OutScope || v->name->var != v)
? (*vp = v->in_scope, 0)
: ( vp = &v->in_scope, 0)) {
+ v->min_depth = c->scope_depth;
if (v->name->var != v) {
/* This is still in scope, but we haven't just
* closed the scope.
v2 = v2->previous)
if (v2->type == Tlabel) {
v2->scope = CondScope;
- v2->min_depth = c->scope_depth;
} else
v2->scope = OutScope;
break;