FORTRAN Generation
(/./ftp/cats/V/59/)

Conversion of standardized ReadMe file for file /./ftp/cats/V/59/ into FORTRAN code for reading data files line by line.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2017-Nov-22
C=============================================================================
*  This code was generated from the ReadMe file documenting a catalogue
*  according to the "Standard for Documentation of Astronomical Catalogues"
*  currently in use by the Astronomical Data Centers (CDS, ADC, A&A)
*  (see full documentation at URL http://vizier.u-strasbg.fr/doc/catstd.htx)
*  Please report problems or questions to   
C=============================================================================

      implicit none
*  Unspecified or NULL values, generally corresponding to blank columns,
*  are assigned one of the following special values:
*     rNULL__    for unknown or NULL floating-point values
*     iNULL__    for unknown or NULL   integer      values
      real*4     rNULL__
      integer*4  iNULL__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. V/59      Cataclysmic Binaries, LMXBs and related objects, 5th Ed. (Ritter 1990)
*================================================================================
*Catalogue of cataclysmic binaries, low-mass X-ray binaries and
*related objects (5th edition).
*     RITTER H.: 1990
*    <Astron. Astrophys. Suppl. Ser. 85, 1179 (1990)>
*    =1990A&AS...85.1179R
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'catalog'	! *Cataclysmic binaries in machine-readable format

      integer*4 nr__
      parameter (nr__=168)	! Number of records
      character*214 ar__   	! Full-size record

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*12  Name        ! Object name
      character*12  Alias       ! Alternative name
      integer*4     RAh         ! (h) Right Ascension J2000 (hours)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) ?Right Ascension J2000 (seconds)
      character*1   DE_         ! Declination J2000 (sign)
      integer*4     DEd         ! (deg) Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs         ! (arcsec) ? Declination J2000 (seconds)
      character*1   e_DEs       ! (arcsec) [1-9A-F]  Accuracy of the coordinates,
*                                    in hexadecimal number (A=10")
      character*2   Type1       ! Type of the object (1)
      character*1   u_Type1     ! [?] Uncertainty flag on Type1
      character*2   Type2       ! Second Type of the object (1)
      character*1   u_Type2     ! [?] Uncertainty flag on Type2
      character*2   Type3       ! Third Type of the object (1)
      character*2   Type4       ! Fourth Type of the object (1)
      character*1   l_mag1      ! Limit flag on mag1
      real*4        mag1        ! (mag) ?=99.9 MAG1 (see "print" file page 13)
      character*1   x_mag1      ! [B] Indication on mag1 (2)
      character*1   l_mag2      ! [>] Limit flag on mag2
      real*4        mag2        ! (mag) ?=99.9 MAG2 (see "print" file page 13)
      character*1   x_mag2      ! [B] Indication on mag2 (2)
      character*1   l_mag3      ! Limit flag on mag3
      real*4        mag3        ! (mag) ?=99.9 MAG3 (see "print" file page 13)
      character*1   x_mag3      ! [B?:] Indication on mag3 (2)
      character*1   l_mag4      ! [>] Limit flag on mag4
      real*4        mag4        ! (mag) ?=99.9 MAG4 (see "print" file page 13)
      character*1   x_mag4      ! [B:] Indication on mag4 (2)
      integer*4     T1          ! (d) ? typical time interval between outbursts
      character*1   n_T1        ! [-:] may be ":" or "-", when a maximum value
*                                    T1upper is available
      integer*4     T1upper     ! (d) ? Maximum value of T1
      integer*4     T2          ! (d) ? Time interval between superoutbursts
      character*1   u_T2        ! [?:] Uncertainty flag on T2
      real*8        Per1        ! (d) ? Orbital period, in days
      character*1   u_Per1      ! [*:] ":" means uncertain value, and a
*                                       "*" means spectroscopic period
      real*8        Per2        ! (d) ? Second period in days (see "print" file)
      character*1   u_Per2      ! Uncertainty flag (:) on Per2
      real*8        Per3        ! (s) ? Third Period (see "print" file) in seconds
      character*1   n_Per3      ! [:QT] Transient note (3)
      real*8        Per4        ! (s) ? Fourth Period (see "print" file) in seconds
      character*1   EBflag      ! [12D] occurence of eclipses (see "print" file)
      integer*4     SBflag      ! [1/2]? Type of spectroscopic binary
      character*8   Sp2         ! Spectral type of the secondary (4)
      character*4   Sp1         ! Spectral type of the primary (4)
      real*4        M1_M2       ! ? Mass ratio M1/M2
      character*1   u_M1_M2     ! Uncertainty flag (:) on M1/M2
      real*4        e_M1_M2     ! ? error of M1/M2
      character*1   l_i         ! [<] Limit flag on i
      real*4        i           ! (deg) ? Orbital inclination
      character*1   u_i         ! Uncertainty flag (:) on i
      real*4        e_i         ! (deg) ? Mean error on i
      character*1   l_M1        ! Limit flag on M1
      real*4        M1          ! (solMass) ? Mass of the primary
      character*1   u_M1        ! Uncertainty flag (:) on M1
      real*4        e_M1        ! (solMass) ? Mean error on M1
      real*4        M2          ! (solMass) ? Mass of the secondary
      character*1   u_M2        ! Uncertainty flag (:) on M2
      real*4        e_M2        ! (solMass) ? Mean error on M2
*Note (1): see "print" file, pages 12-13
*Note (2): a "B" means that the magnitude is blue (visual otherwise)
*          a "?" or ":" means that the value is uncertain
*Note (3): "Q" means occurence of transient quasi-periodic oscillations
*          "T" means transient
*          ":" means unaccurate
*Note (4): the rightmost number indicates the luminosity class, i.e.
*     1=I    2=II    3=III    4=IV    5=V    6=VI

C=============================================================================

C  Loading file 'catalog'	! *Cataclysmic binaries in machine-readable format

C  Format for file interpretation

    1 format(
     +  A12,1X,A12,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,A1,1X,
     +  A2,A1,A2,A1,1X,A2,1X,A2,1X,A1,F4.1,A1,1X,A1,F4.1,A1,1X,A1,
     +  F4.1,A1,1X,A1,F4.1,A1,1X,I3,A1,I2,1X,I5,A1,F9.6,A1,F9.6,A1,1X,
     +  F9.4,A1,1X,F11.4,1X,A1,1X,I1,1X,A8,2X,A4,1X,F5.2,A1,1X,F4.2,
     +  1X,A1,F4.1,A1,1X,F4.1,1X,A1,F4.2,A1,1X,F4.2,1X,F5.3,A1,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog')
      write(6,*) '....Loading file: catalog'
      do i__=1,168
        read(1,'(A214)')ar__
        read(ar__,1)
     +  Name,Alias,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_DEs,Type1,u_Type1,
     +  Type2,u_Type2,Type3,Type4,l_mag1,mag1,x_mag1,l_mag2,mag2,
     +  x_mag2,l_mag3,mag3,x_mag3,l_mag4,mag4,x_mag4,T1,n_T1,T1upper,
     +  T2,u_T2,Per1,u_Per1,Per2,u_Per2,Per3,n_Per3,Per4,EBflag,
     +  SBflag,Sp2,Sp1,M1_M2,u_M1_M2,e_M1_M2,l_i,i,u_i,e_i,l_M1,M1,
     +  u_M1,e_M1,M2,u_M2,e_M2
        if(ar__(33:36) .EQ. '') RAs = rNULL__
        if(ar__(45:46) .EQ. '') DEs = iNULL__
        if(ar__(91:93) .EQ. '') T1 = iNULL__
        if(ar__(95:96) .EQ. '') T1upper = iNULL__
        if(ar__(98:102) .EQ. '') T2 = iNULL__
        if(ar__(104:112) .EQ. '') Per1 = rNULL__
        if(ar__(114:122) .EQ. '') Per2 = rNULL__
        if(ar__(125:133) .EQ. '') Per3 = rNULL__
        if(ar__(136:146) .EQ. '') Per4 = rNULL__
        if(ar__(150:150) .EQ. '') SBflag = iNULL__
        if(ar__(167:171) .EQ. '') M1_M2 = rNULL__
        if(ar__(174:177) .EQ. '') e_M1_M2 = rNULL__
        if(ar__(180:183) .EQ. '') i = rNULL__
        if(ar__(186:189) .EQ. '') e_i = rNULL__
        if(ar__(192:195) .EQ. '') M1 = rNULL__
        if(ar__(198:201) .EQ. '') e_M1 = rNULL__
        if(ar__(203:207) .EQ. '') M2 = rNULL__
        if(ar__(210:214) .EQ. '') e_M2 = rNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  Name,Alias,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_DEs,Type1,u_Type1,
     +  Type2,u_Type2,Type3,Type4,l_mag1,mag1,x_mag1,l_mag2,mag2,
     +  x_mag2,l_mag3,mag3,x_mag3,l_mag4,mag4,x_mag4,T1,n_T1,T1upper,
     +  T2,u_T2,Per1,u_Per1,Per2,u_Per2,Per3,n_Per3,Per4,EBflag,
     +  SBflag,Sp2,Sp1,M1_M2,u_M1_M2,e_M1_M2,l_i,i,u_i,e_i,l_M1,M1,
     +  u_M1,e_M1,M2,u_M2,e_M2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end