contrib/sc/interp.c
/*
 * Evaluate all cells which have expressions and alter their numeric or string
 * values.  Return the number of cells which changed.
 */
Evaluate all cells which have expressions and alter their numeric or string
values.  Return the number of cells which changed.
Evaluate all cells which have expressions and alter their numeric or string values . Return the number of cells which changed .
int 
RealEvalAll () {
    register int i,j;
    int chgct = 0;
    register struct ent *p;
    (void) signal(SIGFPE, eval_fpe);
#ifdef EXPRTREE
    for (p = firstev; p; p = p->evnext)
	    RealEvalOne(p, &chgct);
#else
    if(calc_order == BYROWS ) {
	for (i=0; i<=maxrow; i++)
	    for (j=0; j<=maxcol; j++)
		if ((p=tbl[i][j]) && p->expr) RealEvalOne(p,i,j, &chgct);
    }
    else if ( calc_order == BYCOLS ) {
	for (j=0; j<=maxcol; j++)
	{   for (i=0; i<=maxrow; i++)
		if ((p=tbl[i][j]) && p->expr) RealEvalOne(p,i,j, &chgct);
	}
    }
    else error("Internal error calc_order");
#endif
    (void) signal(SIGFPE, quit);
    return(chgct);
}
int RealEvalAll ( ) { register int i , j ; int chgct = 0 ; register struct ent * p ; ( void ) signal ( SIGFPE , eval_fpe ) ; #ifdef EXPRTREE for ( p = firstev ; p ; p = p -> evnext ) RealEvalOne ( p , & chgct ) ; #else if ( calc_order == BYROWS ) { for ( i = 0 ; i <= maxrow ; i ++ ) for ( j = 0 ; j <= maxcol ; j ++ ) if ( ( p = tbl [ i ] [ j ] ) && p -> expr ) RealEvalOne ( p , i , j , & chgct ) ; } else if ( calc_order == BYCOLS ) { for ( j = 0 ; j <= maxcol ; j ++ ) { for ( i = 0 ; i <= maxrow ; i ++ ) if ( ( p = tbl [ i ] [ j ] ) && p -> expr ) RealEvalOne ( p , i , j , & chgct ) ; } } else error ( " " ) ; #endif ( void ) signal ( SIGFPE , quit ) ; return ( chgct ) ; }
Evaluate all cells which have expressions and alter their numeric or string
 values.
Evaluate all cells which have expressions and alter their numeric or string values .