Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$ISUB                         Domain/OS                          VEC_$ISUB


NAME
     vec_$isub - subtract 32-bit integer vectors

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

     void vec_$isub(
          long *start_vec,
          long *sub_vec,
          long int &length,
          long *result_vec)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

     procedure vec_$isub(
          in start_vec: univ vec_$integer32_vector;
          in sub_vec: univ vec_$integer32_vector;
          in length: integer32;
          out result_vec: univ vec_$integer32_vector);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vec.ins.ftn'

           parameter (nvec = 10)

           integer*4 start_vec(nvec), sub_vec(nvec), result_vec(nvec)
           integer*4 length

           call vec_$isub(start_vec, sub_vec, length, result_vec)

DESCRIPTION
     Vec_$isub 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_$isub is used to operate on matrixes in C and Pascal, start_vec,
     result_vec, and result_vec are row vectors; whereas in FORTRAN, they are
     column vectors.

SEE ALSO
     vec_$dsub, vec_$isub16, vec_$isub_i, vec_$sub.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026