      SUBROUTINE GET_TABLE_DESC  (table,column,offset,bitpix,dimens)
C
C----------------------------------------------------------------------
C
C.IDENTIFICATION: Subroutine GET_TABLE_DESC               
C.LIBRARY:        GENERAL
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 -  8 Sep 92 - First version 
C.VERSIONS:       1.0 - 29 Oct 92 - New error handling codes
C.PURPOSE:        read table descriptor arrays for a table column              
C.METHOD:         just get info from  in BINCOMMON
C                 error code ir returned thru VOSCOMMON               
C.SYNTAX:         CALL GET_TABLE_DESC  (table,column,offset,bitpix,dimens)
C
C.PARAMETERS:     INTEGER table        XAS file number of table  file (input)
C                 INTEGER column       logical column number in table (input)
C                 INTEGER offset       physical column position in file
C                 INTEGER bitpix       column bit width (8,16,32,-32,-64)
C                 INTEGER dimens       column dimensionality
C                
C.RESTRICTIONS:   the table may generally not be open when the query is
C                 made, so one cannot use Logical Units but must use XAS
C                 file numbers ... and make an educated guess about which
C                 will be the next XAS file number allocated ....
C.NOTES:          none
C.FILES:          none
C.REFERENCES:     none
C
C----------------------------------------------------------------------
C
      INTEGER TABLE,COLUMN,OFFSET,BITPIX,DIMENS
      INCLUDE 'voscommon.inc'
      INCLUDE 'errors.inc'
      INCLUDE 'hcommon.inc'
      INCLUDE 'bincommon.inc'
C
C     test if file is in allowed range  
      IF(TABLE.LE.0.OR.TABLE.GT.HCOMMON_MAXFILES)THEN
        VOSCOMMON_ERROR=XE_TABOOR
      ENDIF
C     test if column is in allowed range  
      IF(COLUMN.LE.0.OR.COLUMN.GT.BINCOMMON_MAXFIELDS)THEN
        VOSCOMMON_ERROR=XE_COLOOR
      ENDIF
      IF(VOSCOMMON_ERROR.NE.0)RETURN
C
C
      OFFSET=BINCOMMON_OFFSET(TABLE,COLUMN)
      BITPIX=BINCOMMON_BITPIX(TABLE,COLUMN)
      DIMENS=BINCOMMON_DIMENS(TABLE,COLUMN)
      RETURN
      END
