Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$IINIT16                      Domain/OS                       VEC_$IINIT16


NAME
     vec_$iinit16 - initialize a 16-bit integer vector

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

     void vec_$iinit16(
          short *vector,
          long int &length,
          short &constant)

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

     procedure vec_$iinit16(
          var vector: univ vec_$integer16_vector;
          in length: integer32;
          in constant: integer16);

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

           parameter (nvec = 10)

           integer*2 vector(nvec), constant
           integer*4 length

           call vec_$iinit16(vector, length, constant)

DESCRIPTION
     Vec_$iinit16 sets length elements of vector to the 16-bit integer value
     constant.

     In C, the resulting operation is

          for (i = 0; i < length; ++i)
               vector[i] = constant;

     In Pascal, the resulting operation is

          for i := 1 to length do
               begin
               vector[i] := constant;
               end

     In FORTRAN, the resulting operation is

           do 10 i = 1, length
               vector(i) = constant
       10  continue

     vector
          The vector to initialize.

     length
          The number of elements in vector to initialize.

     constant
          The value that the elements of vector should be set to.

NOTES
     In C and Pascal, vec_$iinit16 initializes a row vector; whereas in FOR-
     TRAN, it initializes a column vector.

SEE ALSO
     vec_$dinit, vec_$iinit16, vec_$iinit_i, vec_$init.

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