Initialization Vectors How to build a VECTORobject Selection of and access to parts

Selection of and access to parts

The following program lines use these routines:
...
m_il_v(8L,a);
m_i_i(5L,s_v_i(a,3L));
println(s_v_i(a,2L));
println(s_v_l(a));
printf("%ld\n",s_v_li(a)+3);
...
The routine s_v_i(), selects the ith object of the vector, the routine s_v_l() selects the length of a VECTORobject, and as you know that this is an INTEGERobject you can access the INTvalue of the length with s_v_li(). So the output of the above program, will be the following three lines

#

8

11

There are also routines, which allow you to access the pointer to the array of objects, this is the routine s_v_s(), and if you know that the entries of the VECTORobject are INTEGERobjects you can access their INTvalues using s_v_ii(). Here is the complete description:

To access the parts of the VECTORobject, there is the routine s_v_i(), which selects the ith element, and the routine s_v_ii(), which gives you the INTvalue, of the i-th object of the VECTORobject, which must be an INTEGERobject.
harald.fripertinger "at" uni-graz.at, May 26, 2011

Initialization Vectors How to build a VECTORobject Uni-Graz Mathematik Selection of and access to parts Valid HTML 4.0 Transitional Valid CSS!