VEC_$ISUB16 Domain/OS VEC_$ISUB16
NAME
vec_$isub16 - subtract 16-bit integer vectors
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$isub16(
short *start_vec,
short *sub_vec,
long int &length,
short *result_vec)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$isub16(
in start_vec: univ vec_$integer16_vector;
in sub_vec: univ vec_$integer16_vector;
in length: integer32;
out result_vec: univ vec_$integer16_vector);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
integer*2 start_vec(nvec), sub_vec(nvec), result_vec(nvec)
integer*4 length
call vec_$isub16(start_vec, sub_vec, length, result_vec)
DESCRIPTION
Vec_$isub16 subtracts length elements of sub_vec from start_vec and sup-
plies the difference in result_vec.
In C, the resulting operation is
for (i = 0; i < length; ++i)
result_vec[i] = start_vec[i] - sub_vec[i];
In Pascal, the resulting operation is
for i := 1 to length do
result_vec[i] := start_vec[i] - sub_vec[i];
In FORTRAN, the resulting operation is
do 10 i = 1, length
result_vec(i) = start_vec(i) - sub_vec(i)
10 continue
start_vec
The vector to subtract sub_vec from.
sub_vec
The vector to subtract from start_vec.
length
The number of differences to calculate.
result_vec
The difference of start_vec and sub_vec.
NOTES
When vec_$isub16 is used to operate on matrixes in C and Pascal,
start_vec, result_vec, and result_vec are row vectors; whereas in FOR-
TRAN, they are column vectors.
SEE ALSO
vec_$dsub, vec_$isub16_i, vec_$isub_i, vec_$sub.