TOC PREV NEXT INDEX

DVgrid_read

Synopsis

Reads grid oriented text.

module DVgrid_read {
string+Iparam filename;
string+Iparam delimiter; // column seperator,
e.g. space, tab, comma
int+read+IPort2 skip_lines; // lines at the start of
the file to skip
int+read+IPort2 col_header; // top row is header
int+read+IPort2 row_header; // left column is header
int+read+IPort2 data_type; // Same as #defs in include/avs/dtype.h
Mesh_Unif+Node_Data+Oparam out;
string+Oparam x_labels[];
string+Oparam y_labels[];
omethod+notify_inst+notify_val upd_func<status=1>
= "DVgrid_read_update";
};

Description

DVgrid_read reads grid oriented text into a uniform field. The data fields are often the result of exporting a spreadsheet or data base into a text format. The reader will attempt to determine the number of rows and columns by looking at the data file. Each row of data is assumed to end with a line termination character. The columns are assumed to be separated by the column separator character. If the data type is 12(DTYPE_UNSET) the reader will look at the file to guess between integer and double (floating point).

Input

filename

A string. Names the input file to be read. The string can be either the complete absolute pathname, or a relative pathname. If it is relative, it will be interpreted relative to the user's working directory when AVS/Express was started.

delimiter

A string indicating the column separator such as a space, tab, comma, etc.

skip_lines

integer. The number of lines to skip at the beginning of the file

col_header

Boolean that specifies whether the the top row is a header (text labels)

row_header

Boolean indicating whether the left column is a header (text labels)

data type

integer. The type of data (byte, float, integer, etc.) to be read in. Use the defines from include/avs/dtype.h

Output

out

The output is a new Uniform Field.

x_labels

string array. The column headers, if present

y_labels

string array. The row headers, if present

Example

Not available.

File

v/dv.v

See also

DVtable_read
DVread_seq_binary
DVread_seq_ascii

TOC PREV NEXT INDEX