ExodusII  6.05
ex_put_info.c File Reference
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
#include "netcdf.h"

Functions

int ex_put_info (int exoid, int num_info, char *info[])

Function Documentation

int ex_put_info ( int  exoid,
int  num_info,
char *  info[] 
)

The function ex_put_info() writes information records to the database. The records are MAX_LINE_LENGTH-character strings.

In case of an error, ex_put_info() returns a negative number; a warning will return a positive number. Possible causes of errors include:

  • data file not properly opened with call to ex_create() or ex_open()
  • data file opened for read only.
  • information records already exist in file.
Parameters:
[in]exoidexodus file ID returned from a previous call to ex_create() or ex_open().
[in]num_infoThe number of information records.
[in]infoArray containing the information records. To only define the number of info records instead of defining and outputting, pass NULL for info argument.

The following code will write out three information records to an open exodus file -

int error, exoid, num_info;
char *info[3];

\comment{write information records}
num_info = 3;

info[0] = "This is the first information record.";
info[1] = "This is the second information record.";
info[2] = "This is the third information record.";

error = ex_put_info(exoid, num_info, info);

The following code will first tell the database that there are three information records, and then later actually output those records.

int error, exoid, num_info;
char *info[3];

\comment{Define the number of information records that will be written
later.}
num_info = 3;

error = ex_put_info(exoid, num_info, NULL);


\comment{Now, actually write the information records}
info[0] = "This is the first information record.";
info[1] = "This is the second information record.";
info[2] = "This is the third information record.";
error = ex_put_info(exoid, num_info, info);
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines