FORTRAN Generation
(/./ftp/cats/J/A_A/538/A74)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/538/A74 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 2024-Apr-19
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. J/A+A/538/A74       Massive binaries in Cepheus OB2/3 region     (Peter+, 2012)
*================================================================================
*Massive binaries in the Cepheus OB2/3 region.
*Constraining the formation mechanism of massive stars.
*    Peter D., Feldt M., Henning T., Hormuth F.
*   <Astron. Astrophys., 538, A74 (2012)>
*   =2012A&A...538A..74P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! Target list of AstraLux observations

      integer*4 nr__
      parameter (nr__=153)	! Number of records
      character*170 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*24  Name        ! Star name
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      integer*4     DEs         ! (arcsec) Declination (J2000)
      character*10  SpType      ! MK spectral type
      real*4        Sep         ! (arcsec) ?=- Separation of the detected companions up
*                                   to a maximum separation of 3". Any companion
*                                   further out is not shown
      character*1   u_Sep       ! [?] Uncertainty flag on Sep
      real*4        PA          ! (deg) ? Position angle
      character*1   u_PA        ! [?] Uncertainty flag on PA
      real*4        q           ! (mag) ?=- Magnitude difference between primary and
*                                      secondary
      character*1   u_q         ! [?] Uncertainty flag on q
      character*2   Mmb         ! [y n pm] Membership of the target to the
*                                  association: y=yes, n=no,
*                                  pm=probable member, pn=probable non-member
      character*5   r_Mmb       ! Reference for Mmb (1)
      character*6   SpType1     ! Other MK spectral type
      character*12  r_SpType1   ! Reference(s) for SpType1 (1)
      character*7   SpType2     ! Other MK spectral type
      character*11  r_SpType2   ! Reference(s) for SpType2 (1)
      character*10  SpType3     ! Other MK spectral type
      character*8   r_SpType3   ! Reference(s) for SpType3 (1)
      character*8   SpType4     ! Other MK spectral type
      character*5   r_SpType4   ! Reference(s) for SpType4 (1)
      character*9   SpType5     ! Other MK spectral type
      character*2   r_SpType5   ! Reference(s) for SpType5 (1)
*Note (1): References as follows:
*  16 = Roeser & Bastian (1988A&AS...74..449R, Cat. I/146)
*  17 = Simonson (1968ApJ...154..923S)
*  18 = Garrison (1970AJ.....75.1001G)
*  19 = Contreras et al. (2002AJ....124.1585C)
*  20 = Morgan et al. (1955ApJS....2...41M)
*  21 = Blaauw et al. (1959ApJ...130...69B)
*  22 = Garrison & Kormendy (1976PASP...88..865G)
*  23 = Walborn (1971ApJS...23..257W)
*  24 = Jaschek et al. (1964PLPla..28....1J, Cat. III/18)
*  25 = Sicilia-Aguilar et al. (2005AJ....130..188S, Cat. J/AJ/130/188)
*  26 = Hiltner & Johnson (1956ApJ...124..367H)
*  27 = Melikian et al. (1988IBVS.3187....1M)
*  28 = Skiff (2007, Cat. II/277)
*  29 = Kharchenko (2001KFNT...17..409K, Cat. I/280)
*  30 = Garmany & Stencel (1992A&AS...94..211G)
*  31 = Morgan et al. (1953ApJ...118..318M)
*  32 = Mendoza V. (1958ApJ...128..207M)

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

C  Loading file 'tablea1.dat'	! Target list of AstraLux observations

C  Format for file interpretation

    1 format(
     +  A24,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,A10,1X,F4.2,
     +  A1,1X,F5.1,A1,1X,F4.2,A1,1X,A2,A5,1X,A6,1X,A12,1X,A7,1X,A11,
     +  1X,A10,1X,A8,1X,A8,A5,1X,A9,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,153
        read(1,'(A170)')ar__
        read(ar__,1)
     +  Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,Sep,u_Sep,PA,u_PA,q,
     +  u_q,Mmb,r_Mmb,SpType1,r_SpType1,SpType2,r_SpType2,SpType3,
     +  r_SpType3,SpType4,r_SpType4,SpType5,r_SpType5
        if (idig(ar__(58:61)).EQ.0) Sep =  rNULL__
        if(ar__(64:68) .EQ. '') PA = rNULL__
        if (idig(ar__(71:74)).EQ.0) q =  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,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,Sep,u_Sep,PA,u_PA,q,
     +  u_q,Mmb,r_Mmb,SpType1,r_SpType1,SpType2,r_SpType2,SpType3,
     +  r_SpType3,SpType4,r_SpType4,SpType5,r_SpType5
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end