EIF_open_var


Open a VAR file for reading or writing.

Synopsis


EIF_open_var    (cname,length,r_w,  lu, error);

Input Parameters


char *cname,*r_w;    int *length ;

Output Parameters


int *error, *lu;

Returns

None.

Arguments

cname

The name of the VAR file to open.
 

lenght

The length of the name of the var file cname.
 

r_w

Read/write flag. It can be one of the following values, ("r","w")
 

lu

Logical unit for the VAR file..
 

error
 

The flag error.

Include Files


EIF_lib.h, EIF_data.h, EIF_std.h
Description
EIF_open_var  opens a var file.  If the open fails, the flag error is -1.
Example


#include <string.h> #include <stdio.h> #include "EIF_std.h" #include "EIF_lib.h" ... int       error, len, lu; char    openmode[2], FileName[256];          // Open the variable file strcpy( FileName, "Example.var" ); len = strlen(FileName); openmode[0] = 'r'; openmode[1] = 0; lu = 0; EIF_open_var( FileName, &len, openmode, &lu, &error); if( error == 0 ) {                       // Do something with it } ...

Related Routines

EIF_close_read_var , EIF_close_write_var, VAR files sample