FORTRAN Generation
(/./ftp/cats/J/A_A/509/A11)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/509/A11 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-Mar-28
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/509/A11   H{alpha} emission-line objects in SMC clusters (Martayan+, 2010)
*================================================================================
*A slitless spectroscopic survey for H{alpha} emission-line objects in SMC
*clusters.
*    Martayan C., Baade D., Fabregat J.
*   <Astron. Astrophys. 509, A11 (2010)>
*   =2010A&A...509A..11M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! Emission-line stars in NGC 346, part 1

      integer*4 nr__
      parameter (nr__=55)	! Number of records
      character*137 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)

      integer*4     Seq         ! [1/55] WFI[S11] NGC 346- number
      integer*4     RAh         ! (h) WFI right ascension (J2000)
      integer*4     RAm         ! (min) WFI right ascension (J2000)
      real*4        RAs         ! (s) WFI right ascension (J2000)
      character*1   DE_         ! WFI declination sign (J2000)
      integer*4     DEd         ! (deg) WFI declination (J2000)
      integer*4     DEm         ! (arcmin) WFI declination (J2000)
      real*4        DEs         ! (arcsec) WFI declination (J2000)
      integer*4     RA2_h       ! (h) ?=- 2MASS right ascension (J2000)
      integer*4     RA2_m       ! (min) ?=- 2MASS right ascension (J2000)
      real*4        RA2_s       ! (s) ?=- 2MASS right ascension (J2000)
      character*1   DE2__       ! 2MASS declination sign (J2000)
      integer*4     DE2_d       ! (deg) ?=- 2MASS declination (J2000)
      integer*4     DE2_m       ! (arcmin) ?=- 2MASS declination (J2000)
      real*4        DE2_s       ! (arcsec) ?=- 2MASS declination (J2000)
      integer*4     RAe_h       ! (h) ?=- EIS right ascension (J2000)
      integer*4     RAe_m       ! (min) ?=- EIS right ascension (J2000)
      real*4        RAe_s       ! (s) ?=- EIS right ascension (J2000)
      character*1   DEe__       ! EIS declination sign (J2000)
      integer*4     DEe_d       ! (deg) ?=- EIS declination (J2000)
      integer*4     DEe_m       ! (arcmin) ?=- EIS declination (J2000)
      real*4        DEe_s       ! (arcsec) ?=- EIS declination (J2000)
      real*4        Bmag        ! (mag) ?=- EIS B magnitude
      character*1   n_Bmag      ! [s] s when magnitude from Simbad
      real*4        Vmag        ! (mag) EIS V magnitude
      character*1   n_Vmag      ! [s] s when magnitude from Simbad
      real*4        Imag        ! (mag) ?=- Denis I magnitude
      real*4        Jmag        ! (mag) ?=- 2MASS J magnitude
      real*4        Hmag        ! (mag) ?=- 2MASS H magnitude
      real*4        Kmag        ! (mag) ?=- 2MASS K magnitude

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

C  Declarations for 'tablea2.dat'	! Emission-line stars in NGC 346, part 2

      integer*4 nr__1
      parameter (nr__1=55)	! Number of records
      character*130 ar__1  	! Full-size record

      integer*4     Seq_1       ! [1/55] WFI NGC 346- number
      character*11  EIS         ! EIS name (SMC5 NNNNNN)
      character*10  OName       ! Other name
      real*4        B_V         ! (mag) ? B-V colour index
      real*4        E_B_V       ! (mag) Colour excess
      real*4        v_B_V_0     ! (mag) ? Deredenned B-V colour index
      real*4        V0mag       ! (mag) Deredenned V magnitude
      real*4        VMAG_1      ! (mag) Absolute V magnitude
      character*4   SpT         ! WFI spectral type
      character*1   n_SpT       ! [*] *: not main-sequence
      character*11  class       ! Simbad spectral class
      character*10  Vclass      ! VFS (Hunter et al., 2008,
*                                   Cat. <J/A+A/479/541>) class
      character*11  Wclass      ! WB07 (Wisniewski et al., 2007,
*                                   Cat. <J/ApJ/671/2040>) class
      character*14  Sclass      ! Spitzer (Nota et al., 2006ApJ...640L..29N)
*                                   class
      character*10  Hclass      ! H08 (Hennekemper et al., 2008ApJ...672..914H)
*                                   class

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

C  Declarations for 'tableb1.dat'	! *Data for individual observations of open
                              clusters in the SMC

      integer*4 nr__2
      parameter (nr__2=159)	! Number of records
      character*102 ar__2  	! Full-size record

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

      character*6   Cluster     ! Cluster name (SMCNNN)
      integer*4     WFImg       ! WFI image number
      integer*4     RAh_1       ! (h) Right ascension (J2000)
      integer*4     RAm_1       ! (min) Right ascension 9J2000)
      real*4        RAs_1       ! (s) Right ascension (J2000)
      character*1   DE__1       ! Declination sign (J2000)
      integer*4     DEd_1       ! (deg) Declination (J2000)
      integer*4     DEm_1       ! (arcmin) Declination (J2000)
      real*4        DEs_1       ! (arcsec) Declination (J2000)
      integer*4     r           ! (arcsec) Radius (1)
      character*1   l_logt      ! Limit flag on logt
      real*4        logt        ! ([yr]) Age (from Pietrzynski & Udalski,
*                                   1999AcA....49..157P)
      character*2   l_Z         ! [<= ] Limit flag on Z
      real*4        Z           ! Area of metallicity (from Cioni et al.,
*                                   2006A&A...452..195C)
      real*4        Z2          ! ? Area of metallicity (from Cioni et al.,
*                                    2006A&A...452..195C)
      integer*4     N_          ! Total number of stars/spectra extracted
      integer*4     Nem         ! Number of definite emission-line stars found
      integer*4     Nem_        ! Number of candidate emission-line stars found
      integer*4     Nem__1      ! Total number of (definite+candidate) emission
*                                   line stars
      real*4        em_t        ! (%) Proportion in % of emission-line stars to the
*                                   whole sample by open cluster
      integer*4     O_          ! OGLE Total number of stars/spectra
*                                   extracted (2)
      integer*4     Oem         ! OGLE Number of definite emission-line stars
*                                   found (2)
      integer*4     Oem_        ! OGLE Number of candidate emission-line stars
*                                   found (2)
      character*8   Comm        ! Comments (3)
      real*4        N           ! OGLE/WFI Total number of stars/spectra
*                                   extracted
      real*4        ELS         ! ? OGLE/WFI Number of definite emission-line
*                                    stars found
*Note (1): The radii used in this study is generally equal to 1.5x
*     the radii from Pietrzynski & Udalski (1999AcA....49..157P).
*Note (2): Number of stars for each category found in OGLE catalogues
*     (Udalski et al., 1998, Cat. <J/AcA/48/147>).
*Note (3): Comments as follows:
*      1 = SMC17 and SMC18 have common stars since it appears to be 
*          a binary cluster
*      2 = The extracted spectrum of the candidate emission-line star 
*          is a blend of 2 emission-line stars spectra

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

C  Declarations for 'tableb2.dat'	! Details about the individual open clusters with
                              different observations merged

      integer*4 nr__3
      parameter (nr__3=83)	! Number of records
      character*81 ar__3  	! Full-size record

      character*6   Cluster_1   ! Cluster name (SMCNNN)
      integer*4     On_         ! OGLE number of normal stars
      integer*4     Oem_1       ! OGLE number of emission-line stars
      integer*4     Oem__1      ! OGLE number of candidate emission-line stars
      integer*4     Nem_1       ! Number of emission-line stars not from OGLE
      real*4        ELS_all     ! (%) Ratio of emission-line to all stars
      integer*4     Be          ! ? Number of Be stars
      integer*4     Be_         ! ? Number of candidate Be stars
      integer*4     B           ! ? Number of B stars
      real*4        Be_B        ! (%) ? Ratio of Be to all B stars
      real*4        Be__B       ! (%) ? Ratio of (Be + candidate Be) to all b stars
      integer*4     Oe          ! ? Number of Oe stars
      integer*4     O           ! ? Number of O stars
      real*4        Oe_O        ! (%) ? Ratio of Oe to all O stars
      integer*4     Ae          ! ? Number of Ae stars
      integer*4     A           ! ? Number of A stars
      real*4        Ae_A        ! (%) ? Ratio of Ae to all A stars
      integer*4     OBAe        ! ? Number of emission-line stars (Oe, Be and Ae)
      integer*4     OBA         ! ? Number of all O, B and A stars
      real*4        OBAe_OBA    ! ? Ratio of OBA emissions stars to all OBA stars
      integer*4     F_Me        ! ? Number of emission-line stars from main
*                                 sequence but not OBA type

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

C  Declarations for 'tableca.dat'	! SMC cluster stars cross-correlation WFI with
                             OGLE (Udalski et al., 1998, Cat. <J/AcA/48/147>)
                             (tables C1, C3, C5 and C7 of paper)

      integer*4 nr__4
      parameter (nr__4=266)	! Number of records
      character*132 ar__4  	! Full-size record

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

      integer*4     Code        ! [1/4] Code for object type (G1)
      character*6   Cluster_2   ! Cluster name (SMCNNN)
      integer*4     WFImg_1     ! WFI image number
      character*4   OGLEimg     ! OGLE image number
      integer*4     WFI         ! WFI sequential number
      integer*4     OGLE        ! OGLE sequential number
      real*4        Rad         ! (arcsec) Distance between OGLE and WFI positions
      integer*4     RAh_2       ! (h) WFI right ascension (J2000)
      integer*4     RAm_2       ! (min) WFI right ascension (J2000)
      real*4        RAs_2       ! (s) WFI right ascension (J2000)
      character*1   DE__2       ! WFI declination sign (J2000)
      integer*4     DEd_2       ! (deg) WFI declination (J2000)
      integer*4     DEm_2       ! (arcmin) WFI declination (J2000)
      real*4        DEs_2       ! (arcsec) WFI declination (J2000)
      integer*4     RA2h        ! (h) OGLE right ascension (J2000)
      integer*4     RA2m        ! (min) OGLE right ascension (J2000)
      real*4        RA2s        ! (s) OGLE right ascension (J2000)
      character*1   DE2_        ! OGLE declination sign (J2000)
      integer*4     DE2d        ! (deg) OGLE declination (J2000)
      integer*4     DE2m        ! (arcmin) OGLE declination (J2000)
      real*4        DE2s        ! (arcsec) OGLE declination (J2000)
      real*4        Vmag_2      ! (mag) V magnitude
      real*4        Bmag_1      ! (mag) ?=99.999 B magnitude
      real*4        Imag_1      ! (mag) I magnitude
      real*4        B_V_1       ! (mag) ?=9.999 B-V colour index
      real*4        V_I         ! (mag) V-I colour index
      real*4        E_B_V_1     ! (mag) Colour excess
      real*4        logt_1      ! ([yr]) Age
      integer*4     Mult        ! Code for multiple WFI observations (1)
*Note (1): indicates whether the star is found several times as emission-
*     line star in case of different observations in WFI (different images).
*     1 means that the star was observed once (or the spectrum extracted once).

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

C  Declarations for 'tablecb.dat'	! *SMC cluster stars corrected photometry and
                              classification (tables C2, C4, and C6 of paper)

      integer*4 nr__5
      parameter (nr__5=266)	! Number of records
      character*99 ar__5  	! Full-size record

      integer*4     Code_1      ! Code for object type (G1)
      character*6   Cluster_3   ! Cluster name (SMCNNN)
      integer*4     WFImg_2     ! WFI image number
      integer*4     WFI_1       ! WFI sequential number
      real*4        v_B_V_0_1   ! (mag) ? Corrected B-V colour index
      real*4        V0mag_1     ! (mag) Corrected V magnitude
      real*4        VMAG_3      ! (mag) Absolute V magnitude
      real*4        v_V_I_0     ! (mag) Corrected V-I colour index
      character*11  SpT_1       ! Spectral type
      character*25  SName       ! Simbad name
      character*1   u_SName     ! [?] ? indicates a poor degree of confidence
*                                       on the identification in Simbad
      character*14  Stype       ! Simbad object type

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

C  Declarations for 'tablec9.dat'	! Emission-line star from WFI without
                              identification in SC catalogues from OGLE
                              (Udalski et al. 1998, Cat. <J/AcA/48/147>)

      integer*4 nr__6
      parameter (nr__6=49)	! Number of records
      character*88 ar__6  	! Full-size record

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

      character*6   Cluster_4   ! Cluster name (SMCNNN)
      integer*4     WFImg_3     ! WFI image number
      integer*4     WFI_2       ! WFI sequential number
      integer*4     RAh_3       ! (h) WFI right ascension (J2000)
      integer*4     RAm_3       ! (min) WFI right ascension (J2000)
      real*4        RAs_3       ! (s) WFI right ascension (J2000)
      character*1   DE__3       ! WFI declination sign (J2000)
      integer*4     DEd_3       ! (deg) WFI declination (J2000)
      integer*4     DEm_3       ! (arcmin) WFI declination (J2000)
      real*4        DEs_3       ! (arcsec) WFI declination (J2000)
      real*4        E_B_V_1     ! (mag) Colour excess
      real*4        logt_2      ! ([yr]) Age
      character*4   Status      ! Status (ELS or ELS?)
      character*25  SName_1     ! Simbad name
      character*1   u_SName_1   ! [?] ? indicates a poor degree of confidence
*                                      on the identification in Simbad
      character*5   Stype_1     ! Simbad object type

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

C  Loading file 'tablea1.dat'	! Emission-line stars in NGC 346, part 1

C  Format for file interpretation

    1 format(
     +  17X,I2,2X,I1,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,I1,1X,I2,
     +  1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I1,1X,I2,1X,F6.3,1X,A1,I2,
     +  1X,I2,1X,F5.2,1X,F6.3,A1,1X,F6.3,A1,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,55
        read(1,'(A137)')ar__
        read(ar__,1)
     +  Seq,RAh,RAm,RAs,DE_,DEd,DEm,DEs,RA2_h,RA2_m,RA2_s,DE2__,DE2_d,
     +  DE2_m,DE2_s,RAe_h,RAe_m,RAe_s,DEe__,DEe_d,DEe_m,DEe_s,Bmag,
     +  n_Bmag,Vmag,n_Vmag,Imag,Jmag,Hmag,Kmag
        if (RA2_h .EQ. 45) RA2_h =  iNULL__
        if (RA2_m .EQ. 45) RA2_m =  iNULL__
        if (idig(ar__(52:56)).EQ.0) RA2_s =  rNULL__
        if (DE2_d .EQ. 45) DE2_d =  iNULL__
        if (DE2_m .EQ. 45) DE2_m =  iNULL__
        if (idig(ar__(65:68)).EQ.0) DE2_s =  rNULL__
        if (RAe_h .EQ. 45) RAe_h =  iNULL__
        if (RAe_m .EQ. 45) RAe_m =  iNULL__
        if (idig(ar__(75:80)).EQ.0) RAe_s =  rNULL__
        if (DEe_d .EQ. 45) DEe_d =  iNULL__
        if (DEe_m .EQ. 45) DEe_m =  iNULL__
        if (idig(ar__(89:93)).EQ.0) DEe_s =  rNULL__
        if (idig(ar__(95:100)).EQ.0) Bmag =  rNULL__
        if (idig(ar__(111:116)).EQ.0) Imag =  rNULL__
        if (idig(ar__(118:123)).EQ.0) Jmag =  rNULL__
        if (idig(ar__(125:130)).EQ.0) Hmag =  rNULL__
        if (idig(ar__(132:137)).EQ.0) Kmag =  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)
     +  Seq,RAh,RAm,RAs,DE_,DEd,DEm,DEs,RA2_h,RA2_m,RA2_s,DE2__,DE2_d,
     +  DE2_m,DE2_s,RAe_h,RAe_m,RAe_s,DEe__,DEe_d,DEe_m,DEe_s,Bmag,
     +  n_Bmag,Vmag,n_Vmag,Imag,Jmag,Hmag,Kmag
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! Emission-line stars in NGC 346, part 2

C  Format for file interpretation

    2 format(
     +  8X,I2,1X,A11,1X,A10,1X,F6.3,1X,F4.2,1X,F6.3,1X,F5.2,1X,F5.2,
     +  1X,A4,A1,A11,1X,A10,1X,A11,1X,A14,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,55
        read(1,'(A130)')ar__1
        read(ar__1,2)
     +  Seq_1,EIS,OName,B_V,E_B_V,v_B_V_0,V0mag,VMAG_1,SpT,n_SpT,
     +  class,Vclass,Wclass,Sclass,Hclass
        if(ar__1(35:40) .EQ. '') B_V = rNULL__
        if(ar__1(47:52) .EQ. '') v_B_V_0 = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Seq_1,EIS,OName,B_V,E_B_V,v_B_V_0,V0mag,VMAG_1,SpT,n_SpT,
     +  class,Vclass,Wclass,Sclass,Hclass
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb1.dat'	! *Data for individual observations of open
*                              clusters in the SMC

C  Format for file interpretation

    3 format(
     +  A6,1X,I2,1X,I1,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I3,1X,
     +  A1,F3.1,1X,A2,F5.3,1X,F5.3,1X,I3,1X,I2,1X,I1,1X,I2,1X,F4.1,1X,
     +  I3,1X,I2,1X,I1,1X,A8,1X,F5.1,1X,F5.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb1.dat')
      write(6,*) '....Loading file: tableb1.dat'
      do i__=1,159
        read(1,'(A102)')ar__2
        read(ar__2,3)
     +  Cluster,WFImg,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,r,
     +  l_logt,logt,l_Z,Z,Z2,N_,Nem,Nem_,Nem__1,em_t,O_,Oem,Oem_,Comm,
     +  N,ELS
        if(ar__2(51:55) .EQ. '') Z2 = rNULL__
        if(ar__2(98:102) .EQ. '') ELS = rNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,3)
     +  Cluster,WFImg,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,r,
     +  l_logt,logt,l_Z,Z,Z2,N_,Nem,Nem_,Nem__1,em_t,O_,Oem,Oem_,Comm,
     +  N,ELS
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb2.dat'	! Details about the individual open clusters with
*                              different observations merged

C  Format for file interpretation

    4 format(
     +  A6,1X,I3,1X,I2,1X,I1,1X,I2,1X,F4.1,1X,I2,1X,I1,1X,I2,1X,F5.2,
     +  1X,F6.2,1X,I1,1X,I1,1X,F6.2,1X,I1,1X,I2,F6.2,1X,I2,1X,I3,1X,
     +  F5.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb2.dat')
      write(6,*) '....Loading file: tableb2.dat'
      do i__=1,83
        read(1,'(A81)')ar__3
        read(ar__3,4)
     +  Cluster_1,On_,Oem_1,Oem__1,Nem_1,ELS_all,Be,Be_,B,Be_B,Be__B,
     +  Oe,O,Oe_O,Ae,A,Ae_A,OBAe,OBA,OBAe_OBA,F_Me
        if(ar__3(25:26) .EQ. '') Be = iNULL__
        if(ar__3(28:28) .EQ. '') Be_ = iNULL__
        if(ar__3(30:31) .EQ. '') B = iNULL__
        if(ar__3(33:37) .EQ. '') Be_B = rNULL__
        if(ar__3(39:44) .EQ. '') Be__B = rNULL__
        if(ar__3(46:46) .EQ. '') Oe = iNULL__
        if(ar__3(48:48) .EQ. '') O = iNULL__
        if(ar__3(50:55) .EQ. '') Oe_O = rNULL__
        if(ar__3(57:57) .EQ. '') Ae = iNULL__
        if(ar__3(59:60) .EQ. '') A = iNULL__
        if(ar__3(61:66) .EQ. '') Ae_A = rNULL__
        if(ar__3(68:69) .EQ. '') OBAe = iNULL__
        if(ar__3(71:73) .EQ. '') OBA = iNULL__
        if(ar__3(75:79) .EQ. '') OBAe_OBA = rNULL__
        if(ar__3(81:81) .EQ. '') F_Me = iNULL__
c    ..............Just test output...........
        write(6,4)
     +  Cluster_1,On_,Oem_1,Oem__1,Nem_1,ELS_all,Be,Be_,B,Be_B,Be__B,
     +  Oe,O,Oe_O,Ae,A,Ae_A,OBAe,OBA,OBAe_OBA,F_Me
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableca.dat'	! SMC cluster stars cross-correlation WFI with
*                             OGLE (Udalski et al., 1998, Cat. <J/AcA/48/147>)
*                             (tables C1, C3, C5 and C7 of paper)

C  Format for file interpretation

    5 format(
     +  I1,1X,A6,1X,I2,1X,A4,1X,I5,1X,I6,1X,F3.1,1X,I1,1X,I2,1X,F6.3,
     +  1X,A1,I2,1X,I2,1X,F6.3,1X,I1,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,
     +  F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F5.3,1X,F3.1,
     +  1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableca.dat')
      write(6,*) '....Loading file: tableca.dat'
      do i__=1,266
        read(1,'(A132)')ar__4
        read(ar__4,5)
     +  Code,Cluster_2,WFImg_1,OGLEimg,WFI,OGLE,Rad,RAh_2,RAm_2,RAs_2,
     +  DE__2,DEd_2,DEm_2,DEs_2,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,
     +  Vmag_2,Bmag_1,Imag_1,B_V_1,V_I,E_B_V_1,logt_1,Mult
        RAdeg_2 = rNULL__
        DEdeg_2 = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2 .GT. -180) RAdeg_2=RAh_2*15.
        if(RAm_2 .GT. -180) RAdeg_2=RAdeg_2+RAm_2/4.
        if(RAs_2 .GT. -180) RAdeg_2=RAdeg_2+RAs_2/240.
        if(DEd_2 .GE. 0) DEdeg_2=DEd_2
        if(DEm_2 .GE. 0) DEdeg_2=DEdeg_2+DEm_2/60.
        if(DEs_2 .GE. 0) DEdeg_2=DEdeg_2+DEs_2/3600.
        if(DE__2.EQ.'-'.AND.DEdeg_2.GE.0) DEdeg_2=-DEdeg_2
c    ..............Just test output...........
        write(6,5)
     +  Code,Cluster_2,WFImg_1,OGLEimg,WFI,OGLE,Rad,RAh_2,RAm_2,RAs_2,
     +  DE__2,DEd_2,DEm_2,DEs_2,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,
     +  Vmag_2,Bmag_1,Imag_1,B_V_1,V_I,E_B_V_1,logt_1,Mult
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablecb.dat'	! *SMC cluster stars corrected photometry and
*                              classification (tables C2, C4, and C6 of paper)

C  Format for file interpretation

    6 format(
     +  I1,1X,A6,1X,I2,1X,I5,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,A11,
     +  1X,A25,A1,1X,A14)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablecb.dat')
      write(6,*) '....Loading file: tablecb.dat'
      do i__=1,266
        read(1,'(A99)')ar__5
        read(ar__5,6)
     +  Code_1,Cluster_3,WFImg_2,WFI_1,v_B_V_0_1,V0mag_1,VMAG_3,
     +  v_V_I_0,SpT_1,SName,u_SName,Stype
        if(ar__5(19:24) .EQ. '') v_B_V_0_1 = rNULL__
c    ..............Just test output...........
        write(6,6)
     +  Code_1,Cluster_3,WFImg_2,WFI_1,v_B_V_0_1,V0mag_1,VMAG_3,
     +  v_V_I_0,SpT_1,SName,u_SName,Stype
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablec9.dat'	! Emission-line star from WFI without
*                              identification in SC catalogues from OGLE
*                              (Udalski et al. 1998, Cat. <J/AcA/48/147>)

C  Format for file interpretation

    7 format(
     +  A6,1X,I2,1X,I5,1X,I1,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F6.3,1X,
     +  F5.3,F3.1,1X,A4,1X,A25,A1,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablec9.dat')
      write(6,*) '....Loading file: tablec9.dat'
      do i__=1,49
        read(1,'(A88)')ar__6
        read(ar__6,7)
     +  Cluster_4,WFImg_3,WFI_2,RAh_3,RAm_3,RAs_3,DE__3,DEd_3,DEm_3,
     +  DEs_3,E_B_V_1,logt_2,Status,SName_1,u_SName_1,Stype_1
        RAdeg_3 = rNULL__
        DEdeg_3 = rNULL__
c  Derive coordinates RAdeg_3 and DEdeg_3 from input data
c  (RAdeg_3 and DEdeg_3 are set to rNULL__ when unknown)
        if(RAh_3 .GT. -180) RAdeg_3=RAh_3*15.
        if(RAm_3 .GT. -180) RAdeg_3=RAdeg_3+RAm_3/4.
        if(RAs_3 .GT. -180) RAdeg_3=RAdeg_3+RAs_3/240.
        if(DEd_3 .GE. 0) DEdeg_3=DEd_3
        if(DEm_3 .GE. 0) DEdeg_3=DEdeg_3+DEm_3/60.
        if(DEs_3 .GE. 0) DEdeg_3=DEdeg_3+DEs_3/3600.
        if(DE__3.EQ.'-'.AND.DEdeg_3.GE.0) DEdeg_3=-DEdeg_3
c    ..............Just test output...........
        write(6,7)
     +  Cluster_4,WFImg_3,WFI_2,RAh_3,RAm_3,RAs_3,DE__3,DEd_3,DEm_3,
     +  DEs_3,E_B_V_1,logt_2,Status,SName_1,u_SName_1,Stype_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_3,DEdeg_3
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