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....



AddScalarToArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function AddScalarToArray (Arr: TIntArray; Scalar: integer; var Sum: TIntArray): integer;
[2] function AddScalarToArray (Arr: TInt2DArray; Scalar: integer; var Sum: TInt2DArray): integer;
[3] function AddScalarToArray (Arr: TInt3DArray; Scalar: integer; var Sum: TInt3DArray): integer;
[4] function AddScalarToArray (Arr: TInt4DArray; Scalar: integer; var Sum: TInt4DArray): integer;
[5] function AddScalarToArray (Arr: TDoubleArray; Scalar: double; var Sum: TDoubleArray): integer;
[6] function AddScalarToArray (Arr: TDouble2DArray; Scalar: double; var Sum: TDouble2DArray): integer;
[7] function AddScalarToArray (Arr: TDouble3DArray; Scalar: double; var Sum: TDouble3DArray): integer;
[8] function AddScalarToArray (Arr: TDouble4DArray; Scalar: double; var Sum: TDouble4DArray): integer;

The function AddScalarToArray adds a Scalar to the array Arr and stores the result in the array Sum. The array Sum is automatically resized to match the source array.

The function returns the following error codes:

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



Last Update: 2017-Nov-24