The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



MultiplyArrayByScalar


Unit:SDL_openarrays
Class: none
Declaration: [1] function MultiplyArrayByScalar (Arr: TIntArray; Scalar: integer; var Product: TIntArray): integer;
[2] function MultiplyArrayByScalar (var Arr: TIntArray; Scalar: integer): integer;
[3] function MultiplyArrayByScalar (Arr: TInt2DArray; Scalar: integer; var Product: TInt2DArray): integer;
[4] function MultiplyArrayByScalar (var Arr: TInt2DArray; Scalar: integer): integer;
[5] function MultiplyArrayByScalar (Arr: TInt3DArray; Scalar: integer; var Product: TInt3DArray): integer;
[6] function MultiplyArrayByScalar (var Arr: TInt3DArray; Scalar: integer): integer;
[7] function MultiplyArrayByScalar (Arr: TInt4DArray; Scalar: integer; var Product: TInt4DArray): integer;
[8] function MultiplyArrayByScalar (var Arr: TInt4DArray; Scalar: integer): integer;
[9] function MultiplyArrayByScalar (Arr: TDoubleArray; Scalar: double; var Product: TDoubleArray): integer;
[10] function MultiplyArrayByScalar (var Arr: TDoubleArray; Scalar: double): integer;
[11] function MultiplyArrayByScalar (Arr: TDouble2DArray; Scalar: double; var Product: TDouble2DArray): integer;
[12] function MultiplyArrayByScalar (var Arr: TDouble2DArray; Scalar: double): integer;
[13] function MultiplyArrayByScalar (Arr: TDouble3DArray; Scalar: double; var Product: TDouble3DArray): integer;
[14] function MultiplyArrayByScalar (var Arr: TDouble3DArray; Scalar: double): integer;
[15] function MultiplyArrayByScalar (Arr: TDouble4DArray; Scalar: double; var Product: TDouble4DArray): integer;
[16] function MultiplyArrayByScalar (var Arr: TDouble4DArray; Scalar: double): integer;

The function MultiplyArrayByScalar multiplies the array Arr by the parameter Scalar and returns the result either in the variable array Product (versions [1,3,5,7]) or in the input array Arr (versions [2,4,6,8]). The size of the resulting array Product is automatically adjusted.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Arr has zero size



Last Update: 2017-Nov-25