include define SZ_VAR 31 # GET_SPECPT -- Get the wavelength at the current point in the spectrum # Return a value structure to evexpr() containing the value of the input # variable. # # B.Simon 01-Jun-87 Original procedure get_specpt (var, op) char var[ARB] # i: String containing the variable name pointer op # o: Structure containing value of variable #-- include "compspec.com" char old_var[SZ_VAR] # String saving variable name from previous call pointer old_op # Address of structure from previous call string errstr "Cannot evaluate a function with more than one variable" bool strne() begin if (first_point) { if (first_var) { # Initialize variables for subsequent calls to this routine call strcpy(var,old_var,SZ_VAR) call salloc(old_op,LEN_OPERAND,TY_INT) first_var = false # Check current variable name against value in previous call } else if (strne (var,old_var)) { call error(1,errstr) } } # Set up operand structure call xev_initop (op, 0, TY_REAL) O_VALR(op) = wave end