| VF_element | VD_element | VE_element |
| VCF_element | VCD_element | VCE_element |
| VPF_element | VPD_element | VPE_element |
| VI_element | VBI_element | VSI_element | VLI_element | VQI_element |
| VU_element | VUB_element | VUS_element | VUL_element | VUI_element |
|
| Function | Returns 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/Delphi | uses VFstd;
function VF_element( X:fVector; pos:UInt ): Single; |
|
| Description | The 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; |
|
|
| Return value | X[pos] (except Pascal/Delphi complex versions) |
|
|