STx 3.9 Documentation

Up

BScript Member Functions

Previous

LOGTEXT

Next

SETCONTROL

SaveData

Save a table's data to a text or binary file or to the clipboard.

Usage:

inst SaveData TEXT|ASCII ; table ; path ; header ; columnSeparator ; decSym ; floatFmt ; intFmt [ ; copyFields ]

CON SaveData TEXT|ASCII ; table ; path ; header ; columnSeparator ; decSym ; floatFmt ; intFmt [ ; copyFields ]

Parameters:

table

The table containing the data to save.

path

A valid file name or the keyword CLIPBOARD. If no path is specified, the current working directory is used (see PWD). If the file already exists, it is overwritten. If the keyword CLIPBOARD is specified, the data is copied to the windows clipboard. You can select the fields to copy to the clipboard using the copyFields parameter.

header

1 if the the table field names should be saved as the first line, 0 otherwise. The default is 1.

columnSeparator

The column separator to use. The following keywords are supported:

BLANK | TAB | COMMA | SEMICOLON

The default is BLANK.

decSym

The decimal symbol to use. The following keywords are supported:

DOT | COMMA

The default is DOT.

floatFmt

The format specifier for floating point numbers. See SET table FORMAT for details.

intFmt

The format specifier for integers. See SET table FORMAT for details.

copyFields

A blank separated list of ids of the fields to be copied. Note that this is only supported when copying to the clipboard (path==CLIPBOARD).

Result:

0 if successful, non-zero otherwise.

© 2009 The Austrian Academy of Sciences Acoustics Research Institute