Subroutine: ARITHC
Purpose: Do an arithmetic operation on a real constant and a real
array and store the result in a second one. This routine
checks for BLANK values.
Category: ARRAY
File: arithc.c
Author: K.G. Begeman
Use: CALL ARITHC( CONSTANT, input real
OP, input character
ARRAY1, input real array
ARRAY2, output real array
NUMBER ) input integer
CONSTANT constant.
OP character operand ('+','-','*','/').
ARRAY1 input array.
ARRAY2 output array.
NUMBER number of operations.
Description: For every element of the arrays 1 and 2 the
following operation is performed:
ARRAY2 = CONSTANT 'OP' ARRAY1
The arrays need not be different. OP can be '+', '-', '*'
or '/'. When it is not one of these four, ARRAY2 is
filled with BLANKs. Other errors (e.g. zero divide) also
result in a BLANK value.
Example: Add 10.0 to 100 elements of array A and store the result
in B.
CALL ARITH(10.0,'+',A,B,100)
Updates: Jul 21, 1989: KGB, original document.