VEC_$INIT Domain/OS VEC_$INIT
NAME
vec_$init - initialize a single-precision vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$init(
float *vector,
long int &length,
float &constant)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$init(
var vector: univ vec_$real_vector;
in length: integer32;
in constant: real);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
real vector(nvec), constant
integer*4 length
call vec_$init(vector, length, constant)
DESCRIPTION
Vec_$init sets length elements of vector to the single-precision 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_$init initializes a row vector; whereas in FORTRAN,
it initializes a column vector.
SEE ALSO
vec_$dinit, vec_$iinit, vec_$iinit16, vec_$init_i.