VF_elementVD_elementVE_element
VCF_elementVCD_elementVCE_element
VPF_elementVPD_elementVPE_element
VI_elementVBI_elementVSI_elementVLI_elementVQI_element
VU_elementVUB_elementVUS_elementVUL_elementVUI_element
FunctionReturns the value of a vector element
Syntax C/C++#include <VFstd.h>
float VF_element( fVector X, ui pos );
C++ VecObj#include <OptiVec.h>
T vector<T>::element( ui pos );
Pascal/Delphiuses VFstd;
function VF_element( X:fVector; pos:UInt ): Single;
DescriptionThe element at the position pos is returned.
Pascal/Delphi only: As fComplex and fPolar return values are not possible, the VCF_ and VPF_ versions store Xpos into the variable xpos.
This function is needed to read elements of dynamically allocated vectors, for which older versions of Borland C++ had a pointer arithmetics bug, and Pascal/Delphi - unlike C - does not provide an own mechanism at all.
VF_element is "read-only". This means, you c a n n o t write something like
VF_element( X, 4 ) := 5;
Error handlingnone
Return valueX[pos] (except Pascal/Delphi complex versions)
See alsoVF_Pelement

VectorLib Table of Contents  OptiVec home