C+ C NAME: C d2c C PURPOSE: C Convert digit from integer to single char C CATEGORY: C gen/for/lib/forstr.f C CALLING SEQUENCE: character function d2c(i,n) C INPUTS: C i integer integer C n integer digit number (0,1, etc.) C OUTPUTS: C d2c character*1 decimal digit C PROCEDURE: C Used in functions like Time2Str instead of using a C write statement to avoid I/O recursion. C MODIFICATION HISTORY: C JUL-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer i integer n d2c = char( ichar('0')+mod(i/10**n,10) ) return end