diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/tbtables/fitsio/ftr2f.f | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/fitsio/ftr2f.f')
-rw-r--r-- | pkg/tbtables/fitsio/ftr2f.f | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/ftr2f.f b/pkg/tbtables/fitsio/ftr2f.f new file mode 100644 index 00000000..09e151fd --- /dev/null +++ b/pkg/tbtables/fitsio/ftr2f.f @@ -0,0 +1,34 @@ +C---------------------------------------------------------------------- + subroutine ftr2f(val,dec,cval,status) + +C convert real value to F20.* format character string +C val r input value to be converted +C dec i number of decimal places to display in output string +C cval c output character string +C status i output error status (0 = OK) + + real val + integer dec,status + character*20 cval,form*8 + + if (status .gt. 0)return + + if (dec .ge. 0 .and. dec .le. 9)then + write(form,2000)dec +2000 format('(f20.',i1,')') + else if (dec .ge. 10 .and. dec .lt.18)then + write(form,2001)dec +2001 format('(f20.',i2,')') + else + status=411 + call ftpmsg('Error in FTR2F: number of decimal places ' + & //'is less than 0 or greater than 18.') + return + endif + + write(cval,form,err=900)val + if (cval(1:1) .eq. '*')go to 900 + return +900 status=402 + call ftpmsg('Error in FTR2F converting real to F20. string.') + end |