Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

data_open
Summary

int data_open(name,data)
char *name;       /* name of SURVO 84C data */
SURVO_DATA *data; /* pointer to data structure */
Description

The data_open function opens the SURVO 84C data specified by name. data is a pointer to the SURVO_DATA structure. The structure type SURVO_DATA is defined in survodat.h .

SURVO 84C supports four different forms of data. Data may be located in the current edit field as a data matrix or a data list, or in a SURVO 84C data file or in a SURVO 84C matrix file. All forms of data can be accessed by data_open.

Usually, when writing SURVO 84C modules it is not necessary to know the type of the data (given by the structure member type).

data_open(name,data);
is equivalent to
data_open2(name,data,0,0,0);
which means that, in case of a data file, the data is opened This is usually sufficient in statistical operations.
Return Value

data_open returns 1 if the file was succesfully opened and -1 otherwise. In the latter case an error message SURVO 84C data `name' not found! is displayed.

See Also

data_open2 data_close data_load data_alpha_load

Example

int i;
SURVO_DATA dat;
i=data_open("TEST",&dat);
if (i<0) return;


Front page of Survo C libraries