WATCHing arrays
Posted: Sat Apr 26, 2008 7:22 pm
The following seems to be illegal:
It fails with the following error message:
Variable i is an ASSIGNED, but I get the same result if I declare it local to the NET_RECEIVE block.
Is there a correct way to this?
Code: Select all
NET_RECEIVE (weight) {
...
FROM i = 0 TO N - 1 {
WATCH (myArray[i] < 0) 1
}
...
}- In function '_watch3_cond':
error: '_li' undeclared (first use in this function)
Code: Select all
static double _watch3_cond(_pnt) Point_process* _pnt; {
_p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; v = NODEV(_pnt->node);
return -( ( myArray [ _li ] ) - ( 0.0 ) ) ;
}Is there a correct way to this?