diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/tbtables/fitsio/ftc2x.f | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/fitsio/ftc2x.f')
-rw-r--r-- | pkg/tbtables/fitsio/ftc2x.f | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/ftc2x.f b/pkg/tbtables/fitsio/ftc2x.f new file mode 100644 index 00000000..804c251e --- /dev/null +++ b/pkg/tbtables/fitsio/ftc2x.f @@ -0,0 +1,37 @@ +C---------------------------------------------------------------------- + subroutine ftc2x(cval,dtype,ival,lval,sval,dval,status) + +C convert a character string into it intrinsic data type + +C cval c input character string to be converted +C dtype c returned intrinsic datatype of the string (I,L,C,F) +C +C one of the following values is returned, corresponding to the +C value of dtype: +C ival i integer value +C lval l logical value +C sval c string value +C dval d double precision value +C statue i returned error status + + character*(*) cval + character*1 dtype + integer ival,status + logical lval + character*(*) sval + double precision dval + +C determine intrinsic datatype + call ftdtyp(cval,dtype,status) + +C convert string into its intrinsic datatype + if (dtype .eq. 'I')then + call ftc2ii(cval,ival,status) + else if (dtype .eq. 'F')then + call ftc2dd(cval,dval,status) + else if (dtype .eq. 'L')then + call ftc2ll(cval,lval,status) + else if (dtype .eq. 'C')then + call ftc2s(cval,sval,status) + end if + end |