c c function ifmt (fmttxt) c c c PROGRAM NAME: IFMT.rat c c DATE OF FIRST VERSION: 20-Nov-79 c DATE OF CURRENT VERSION: 21-Jun-83 c c PURPOSE: PLTFIL routine to decode a text annotation c format specification into a form suitable c to be sent as an argument to the Versaplot c routine NUMB. c c USAGE: ndec = IFMT (fmttxt) c c Where fmttxt -- BYTE array containing FORTRAN c type format specification c c ndec -- -1 if format is integer c n if format is FX.n c c PROGRAMMER: Mike Collins / Eric Javel c c************************************************************** c byte fmttxt(1) external index c c-------------------------------------------------------------- c if(.not.(fmttxt(1) .eq. 'F' .or. fmttxt(1) .eq. 'f'))goto 23000 c Floating point format n = index (fmttxt,'.') + 1 if(.not.(n .ne. 1))goto 23002 c Default to integer if no "." decode (1,900,fmttxt(n),err=100) ifmt 900 format (i2) return 23002 continue c Integer format 23000 continue 100 ifmt = -1 return end