_write (OptiVec vector function)">_write">
FunctionDefinition of the separation string used by V.._write
Syntax C/C++#include <VFstd.h>
void VF_setWriteSeparate( char *SepString );
C++ VecObj#include <OptiVec.h>
void vector<T>::setWriteSeparate( char *SepString );
Pascal/Delphiuses VFstd;
procedure VF_setWriteSeparate( SepString:PChar );
DescriptionBy default, VF_write puts a line feed character after each vector element written into a stream. This means that each element gets its own line. You may use VF_setWriteSeparate to define another separation string. This may be, for example, a tab character ("\t" for C/C++ or #9 for Pascal/Delphi) or a series of spaces (e.g., "    " for C/C++ or '    ' for Pascal/Delphi).

VF_write will insert the separation string only in between the vector elements. At the end, after the last element, there is always a line feed ("\n") instead of the separation string.

SepString may contain up to twelve characters.
C/C++ only:
If you use VF_write with the output sent directly to the printer (stream = stdprn), you probably have to explicitly use a carriage return character in addition to the line feed. To do this, call
VF_setWriteSeparate( "\n\r" );

Error handlingIn the case of SepString longer than twelve characters, the program is aborted with the error message "Invalid Parameter(s)".
The contents of SepString is not checked.
Return valuenone
See alsoVF_setWriteFormat,   VF_setNWriteSeparate,   VF_write,   VF_read

VectorLib Table of Contents  OptiVec home