/* header file to aid in conversion of FORTRAN code to C (from "C Tools for Scientists and Engineers" by L. Baker) PURPOSE: performs in-line a number of useful chores including loops, array subscripting, and finding minimum,maximum, and absolute value. DEPENDENCIES: none USAGE: invoke with preprocessor directive: #include "ftoc.h" or #include near the beginning of your program */ /* in-line functions for use with 2D arrays: */ /* row major order as in C indices run 0..n-1 as in C*/ #define INDEX(i,j) [j+(i)*coln] /*various loop constructors */ #define DOFOR(i,to) for(i=0;i0.)?(x):-(x))