aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/fitsio/ftc2l.f
blob: 8a1e22ef618fe20031b29d2d035af0da9740f230 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
C----------------------------------------------------------------------
        subroutine ftc2l(cval,lval,status)

C       convert a character string to a logical value
C       perform datatype conversion, if required

        logical lval
        integer ival,status
        character*(*) cval
        character*1 dtype
        character sval*16
        double precision dval


C       convert string to its intrinsic data type
        call ftc2x(cval,dtype,ival,lval,sval,dval,status)
        if (status .gt. 0)return

        if (dtype .ne. 'L')then
C              this is not a logical keyword, so return error
               status=404
               sval=cval
               call ftpmsg('Error in FTC2L evaluating this string '//
     &          'as a logical value: '//sval)
        end if
        end