DC_WRITE_FIXED Function

Writes the contents of one or more variables (in ASCII fixed format) to a file using a format that you specify.

Usage

Input Parameters

Returned Value

Keywords

Discussion


NOTE: This function can be used to write data from
date/time structures, but not from any other kind of structures.

How the Data is Written to the File


NOTE: Any variable you include in var_list must have been previously created; otherwise, an error occurs.

TIP: If an error does occur, view the contents of the file (using an operating system command) to see how much data was transferred. This will enable you to isolate the portion of the variable list in which the error occurred.

Format Reversion when Writing Data

Missing Data String Substitution while Writing Data

Writing Row-Oriented Data

Writing Column-Oriented Data

Dimensions of Variable Organization of Saved File
One-dimensional(1 x n) One value from each variable written to each record (repeated n times)
Two-dimensional(m columns by n rows) m values from each variable written to each record (repeated n times)
Three-dimensional(m x n x p) m values from each variable written to each of n records (entire process repeated p times)
q-dimensional(m x n x p x q) m values from each variable written to each of n records (above process repeated p times) (entire process repeated q times)

Example 1

Example 2

Example 3


TIP: An even easier way to write this data is to use another "DC" function, DC_WRITE_FREE. The DC_WRITE_FREE function writes
CSV (Comma Separated Values) data by default, or you can use the Delim keyword to specify some other delimiter besides the comma.

Example 4


NOTE: If you have date and time data stored in the same variable, the variable must be listed twice in the variable list in order to extract both the date and time data. For more details, see DC_READ_FREE,
Example 4.

Example 5


NOTE: If you wish to enter a format string similar to the FORTRAN one shown above, try to get the entire format string on the same line. Otherwise, use the string concatenation operator (+), as shown in the above example, to split the format string into two shorter strings.

See Also





doc@boulder.vni.com
Copyright © 1999, Visual Numerics, Inc. All rights reserved.