FORTRAN Generation
(/./ftp/cats/J/A_A/380/238)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/380/238 into FORTRAN code for loading all data files into arrays.

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-29
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/380/238     Long-period companions of multiple stars       (Shatsky, 2001)
*================================================================================
*The long-period companions of multiple stars tend to have
*moderate eccentricities
*    Shatsky N.
*   <Astron. Astrophys. 380, 238 (2001)>
*   =2001A&A...380..238S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Position parameters and angles gamma

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

      character*10  WDS        (nr__) ! Object ID in WDS (Cat. <I/237>) (G1)
      character*2   Comp       (nr__) ! Components designations in MSC,
*                                     Cat. <J/A+AS/124/75>
      real*4        Sep        (nr__) ! (arcsec) Separation from primary for second epoch
      integer*4     PA         (nr__) ! (deg) Position angle for second epoch
      integer*4     gamma      (nr__) ! (deg) [0-360[ gamma-angle for second epoch
      integer*4     e_gamma    (nr__) ! (deg) [2-30[ error of gamma
      real*4        delta      (nr__) ! (arcsec) [0-15] motion - relative position change (2)
      character*3   Note       (nr__) ! [cw*123moOxX]? Note (3)
*Note (2): Motion is equal to the difference of proper motion of companions
*      multiplied by epoch difference, i.e. it is a relative shift of the
*      secondary component during the history of observations.
*Note (3): Note on origin of position parameters and details of gamma
*           calculation:
*      c = first epoch Sep,PA are taken from CCDM (Cat. <I/211>) rather than
*           from WDS (Cat. <I/237>)
*      w = second epoch position is taken from WDS (Cat. <I/237>)
*           (no HIP or Tycho id)
*      * = one of the alternative Hipparcos solutions is accepted
*  1,2,3 = Hipparcos or Tycho photocenter positions are computed for
*          primary, secondary or both subsystems of the object, respectively
*      m = Tycho-II proper motion difference is used to compute gamma
*           instead of Sep, PA-change.
*    O,o = position parameters are corrected for orbital motion in primary,
*           secondary subsystems of the object
*    X,x = uncertainty from unpredictable motion in primary, secondary
*           subsystem is taken into account in e_gamma

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

C  Declarations for 'table2.dat'	! Objects cross-identification

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

      character*10  WDS_1      (nr__1) ! Object ID in WDS (Cat. <I/237>) (G1)
      character*10  IDS        (nr__1) ! Object ID in Index Catalogue IDS
*                                 (1963IDS...C......0J) (2)
      character*2   Comp_1     (nr__1) ! Components designations in MSC,
*                                 Cat. <J/A+AS/124/75>
      character*5   m_WDS      (nr__1) ! ? Components desig. in WDS (3)
      character*10  CCDM       (nr__1) ! ? Object ID in CCDM (Cat. <I/211>) (4)
      character*2   m_CCDM     (nr__1) ! ? Components designations in CCDM
      integer*4     HIP1       (nr__1) ! ? HIP (Cat. <I/239>) number of primary component
      integer*4     HIP2       (nr__1) ! ? HIP (Cat. <I/239>) number of secondary
*                                   (empty if HIP2=HIP1)
      character*2   m_HIP1     (nr__1) ! ? Components designations in DMSA/C (5)
      character*12  TYCHO1     (nr__1) ! ? Tycho identifier of primary
      character*12  TYCHO2     (nr__1) ! ? Tycho identifier of secondary
      character*2   r_TYCHO1   (nr__1) ! [ 12]? Tycho version (<I/239>) or <I/259>)
*                                        for TYCHO1 and TYCHO2 (6)
*Note (2): Index Double Star catalogue identification: also approximate
*      coordinates in the same form as for WDS (Cat. <I/237>)
*      but for equinox 1900.0
*Note (3): Multiple visual systems are denoted as AB-C or AB-CD in WDS
*      (Cat. <I/237>) when position parameters are given there with
*      respect to corresponding (visual) photocenters of subsystems
*Note (4): CCDM (Cat. <I/211>) identification (when available) differs
*       sometimes from WDS (Cat. <I/237>) due to round-off errors in 
*       produced object identifier
*Note (5): Component identifiers as given in Component Solutions of the Double
*      and Multiple Star Annex of Hipparcos Catalogue (Cat. <I/239>) in case
*      of a single HIP-number for both components in question
*Note (6): Position code of a reference of TYCHO1 and TYCHO2 fields:
*        first symbol gives a reference for primary component,
*        second symbol for secondary.
*      1 = Tycho Catalogue (1997, Cat. <I/239>)
*      2 = Tycho-2 Catalogue (2000, Cat. <I/259>)

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

C  Loading file 'table1.dat'	! Position parameters and angles gamma

C  Format for file interpretation

    1 format(A10,1X,A2,1X,F5.1,1X,I3,1X,I3,1X,I2,1X,F4.1,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,174
        read(1,'(A39)')ar__
        read(ar__,1)
     +  WDS(i__),Comp(i__),Sep(i__),PA(i__),gamma(i__),e_gamma(i__),
     +  delta(i__),Note(i__)
c    ..............Just test output...........
        write(6,1)
     +  WDS(i__),Comp(i__),Sep(i__),PA(i__),gamma(i__),e_gamma(i__),
     +  delta(i__),Note(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Objects cross-identification

C  Format for file interpretation

    2 format(
     +  A10,1X,A10,1X,A2,1X,A5,1X,A10,1X,A2,1X,I6,1X,I6,1X,A2,1X,A12,
     +  1X,A12,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,174
        read(1,'(A90)')ar__1
        read(ar__1,2)
     +  WDS_1(i__),IDS(i__),Comp_1(i__),m_WDS(i__),CCDM(i__),
     +  m_CCDM(i__),HIP1(i__),HIP2(i__),m_HIP1(i__),TYCHO1(i__),
     +  TYCHO2(i__),r_TYCHO1(i__)
        if(ar__1(46:51) .EQ. '') HIP1(i__) = iNULL__
        if(ar__1(53:58) .EQ. '') HIP2(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  WDS_1(i__),IDS(i__),Comp_1(i__),m_WDS(i__),CCDM(i__),
     +  m_CCDM(i__),HIP1(i__),HIP2(i__),m_HIP1(i__),TYCHO1(i__),
     +  TYCHO2(i__),r_TYCHO1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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