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