Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

unsuitable
Summary

int unsuitable(data,j)
SURVO_DATA *data; /* pointer to data structure */
long *j;          /* # of observation (record) */
Description

The unsuitable function tests whether observation j in data opened by data_open or data_open2 satisfies the restrictions imposed by IND, CASES and SELECT specifications. Each module must call the conditions function once before the calls of unsuitable.

Return Value

unsuitable returns 1 if the conditions are not fulfilled and 0 otherwise.

See Also

conditions

Example

int i;
long j;
SURVO_DATA dat;

i=data_open("TEST",&dat);
if (i<0) return;
i=conditions(&dat);
if (i<0) { data_close(&dat); return; }
for (j=dat.l1; j<=dat.l2; ++j)
        {
        if (unsuitable(&dat,j)) continue;
        printf(" %ld",j);
        }
/* Numbers of observations satisfying
   the conditions are printed. */


Front page of Survo C libraries