gdaCreate#

Purpose#

Creates a GAUSS Data Archive.

Format#

retcode = gdaCreate(filename, overwrite)#
Parameters:
  • filename (string) – name of data file to create.

  • overwrite (scalar) –

    one of the following:

    0

    error out if file already exists.

    1

    overwrite file if it already exists.

Returns:

retcode (scalar) –

return code, 0 if successful, otherwise one of the following error codes:

1

Null file name.

3

File write error.

6

File already exists.

7

Cannot create file.

Examples#

/*
** Create a GDA named `myfile`
** and overwrite existing `myfile`
*/
ret = gdaCreate("myfile.gda", 1);

Remarks#

This command creates a GAUSS Data Archive containing only a header. To add data to the GDA, call gdaWrite().

It is recommended that you include a .gda extension in filename(). However, gdaCreate() will not force an extension.

See also

Functions gdaWrite()