|Function||Write a vector in ASCII format to a stream.|
|Syntax C/C++||#include <VFstd.h>
void VF_write( FILE *stream, fVector X, ui size );
|C++ VecObj||#include <OptiVec.h>
void vector<T>::write( FILE *stream );
procedure VF_write( var Stream:Text; X:fVector; size:UIntSize );
|Description||size elements of X are written to stream in ASCII format. By default, one element is written per line. To use these functions, stream must already be open for write operations in text format.
The number format and the separation of consecutive elements may be specified using VF_setWriteFormat (C/C++ only) and VF_setWriteSeparate, respectively. See these functions for details.
Storing data in ASCII format is useful if the data have to be readable by human eyes, or if they are to be exported into other programs which are not able to read machine-format numbers. If avoidable, these functions should not be used for the storage of intermediate results that later have again to be read in. Instead, the function pairs of the VF_store / VF_recall family are recommended for the following reasons: conversion into ASCII format is slow, may lead to round-off errors, and requires much more disk memory than storage in machine format.
VectorLib Table of Contents OptiVec home