Changeset: 1943dcfacd7a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1943dcfacd7a Modified Files: monetdb5/mal/mal_function.mx Branch: default Log Message:
Merge with Aug2011 branch. diffs (34 lines): diff --git a/monetdb5/mal/mal_function.mx b/monetdb5/mal/mal_function.mx --- a/monetdb5/mal/mal_function.mx +++ b/monetdb5/mal/mal_function.mx @@ -911,6 +911,11 @@ /* define variables */ for(k=0; k<p->retc; k++){ l= getArg(p,k); + if (isVarInit(mb, l) && decl[l] == 0) { + /* first time we see this variable and it is already + * initialized: assume it exists globally */ + decl[l] = blks[0]; + } setVarInit(mb,l); if( decl[l] == 0){ /* variable has not been defined yet */ @@ -923,18 +928,6 @@ mnstr_printf(GDKout,"defined %s in block %d\n", getVarName(mb,l),decl[l]); #endif - } else - if( !isVarInit(mb,l) ){ - /* is the block still active ? */ - for( i=0; i<= top; i++) - if( blks[i] == decl[l] ) - break; - if( i> top || blks[i]!= decl[l] ){ - showScriptException(mb,pc,TYPE, - "'%s' assigned outside scope", - getVarName(mb,l)); - mb->errors++; - } } if( blockCntrl(p) || blockStart(p) ) setVarUsed(mb, l); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list