VEC_$IZERO16_I Domain/OS VEC_$IZERO16_I
NAME
vec_$izero16_i - zero a vector in a 16-bit integer matrix
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$izero16_i(
short *vector,
long int &inc,
long int &length)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$izero16_i(
var vector: univ vec_$integer16_vector;
in inc: integer32;
in length: integer32);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
integer*2 vector(nvec)
integer*4 length, inc
call vec_$izero16_i(vector, inc, length)
DESCRIPTION
Vec_$izero16_i zeros the length elements of the 16-bit integer array vec-
tor selected by inc.
Through appropriate choice of inc, a program can use vec_$izero16_i to
zero a vector within a matrix. To search the Mth vector in a matrix,
choose inc equal to the number of vectors in the matrix, and place the
Mth element of the matrix array at the beginning of vector.
In C, the resulting operation is
j = 0;
for (i = 0; i < length; ++i) {
vector[i] = 0;
j += inc;
}
In Pascal, the resulting operation is
j := 1;
for i := 1 to length do
begin
vector[i] := 0;
j := j + inc;
end
In FORTRAN, the resulting operation is
j = 1
do 10 i = 1, length
vec(j) = 0
j = j + inc
10 continue
vector
The vector to be zeroed.
inc An increment for the index of vector that chooses the elements to be
zeroed.
length
The number of elements in vector to zero.
NOTES
In C and Pascal, vec_$izero16_i zeros column vectors; whereas in FORTRAN,
it zeros row vectors.
SEE ALSO
vec_$dzero_i, vec_$izero16, vec_$izero_i, vec_$zero_i.