FORTRAN Generation
(/./ftp/cats/II/193)

Conversion of standardized ReadMe file for file /./ftp/cats/II/193 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-Sep-23
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. II/193  UBV Photoelectric Cat: Data 1986-1992 (Mermilliod 1994)
*================================================================================
*UBV Photoelectric Catalogue: Data 1986-1992
*   Mermilliod J.-C.
*  <Bull. Inf. CDS 45, 3 (1994)>
*  =1994BICDS..45....3M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog'	! The UBV data published 1986-1992

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

      integer*8     LID         ! Code number (see file codes)
      character*1   rem         ! *[1234DS] Remark on duplicity or
*                                        identification of components
      character*1   var         ! [V] Remark on variability
      real*8        V           ! (mag) [-1.5/20.5]? V magnitude
      real*4        B_V         ! (mag) [-1/5]? B-V colour index
      real*4        U_B         ! (mag) [-1.5/5]? U-B colour index
      character*1   n_UBV       ! *[S/*] Flag on the number of measurements
      integer*4     o_UBV       ! [0/324]? Number of measurements
      integer*4     r_UBV       ! [1603/1784] Reference key (see file refs)
*Note on rem:
*  the components are indicated by an extra digit;
*        "D" stands for double
*        "S" designates supplementary stars (example in Praesepe,
*            KW 250 and KW 250s both exist)
*Note on n_UBV:
*   S = Standard star
*   / = Number is unknown
*   * = the minimum number of measurements is given

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

C  Loading file 'catalog'	! The UBV data published 1986-1992

C  Format for file interpretation

    1 format(1X,I10,A1,A1,F7.3,1X,F6.3,1X,F6.3,2X,A1,I3,3X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog')
      write(6,*) '....Loading file: catalog'
      do i__=1,25639
        read(1,'(A48)')ar__
        read(ar__,1)LID,rem,var,V,B_V,U_B,n_UBV,o_UBV,r_UBV
        if(ar__(14:20) .EQ. '') V = rNULL__
        if(ar__(22:27) .EQ. '') B_V = rNULL__
        if(ar__(29:34) .EQ. '') U_B = rNULL__
        if(ar__(38:40) .EQ. '') o_UBV = iNULL__
c    ..............Just test output...........
        write(6,1)LID,rem,var,V,B_V,U_B,n_UBV,o_UBV,r_UBV
c    .......End.of.Just test output...........
      end do
      close(1)

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