FCMP Procedure

Example 3: Using Numeric Data in the FUNCTION Statement

Details

The following example uses numeric data as input to the FUNCTION statement of PROC FCMP.

Program

proc fcmp;
   function inverse(in);
      if n=0 then inv=.;
      else inv=1/in; 
      return(inv);
   endsub;
run;