src/stdlib/sequence.c
/*=====================================================
 * fndel -- Search sequence for value - return location
 *===================================================*/
- Search sequence for value - return location
- Search sequence for value - return location
static BOOLEAN
fndel (SEQUENCE seq,   
       ELEMENT val,    
       INT *loc)       
{
	INT i, n;
	ELEMENT *d = Data(seq);
	n = Size(seq);
	*loc = -1;
	for (i = 0; i < n; i++) {
		if (val == d[i]) {
			*loc = i;
			return TRUE;
		}
	}
	return FALSE;
}
static BOOLEAN fndel ( SEQUENCE seq , ELEMENT val , INT * loc ) { INT i , n ; ELEMENT * d = Data ( seq ) ; n = Size ( seq ) ; * loc = -1 ; for ( i = 0 ; i < n ; i ++ ) { if ( val == d [ i ] ) { * loc = i ; return TRUE ; } } return FALSE ; }
fndel -- Search sequence for value - return location
fndel -- Search sequence for value - return location
/* sequence */ /* element value */ /* index if found */