c for new version 1992,11,8
        character*3 f1(18),ac*12,dc*12,mo*70,obj(2),ngcsp(8)
        character c5*5,c4*4,f5*5
        real a(4,32),x1,x4
	integer*2 xx(40)
        integer*2 ind(256),jn,mg,dia,ic,b1(2),b4(2),in
        byte ngc12(2)
        equivalence (x1,b1),(x4,b4),(b1(1),jn),(b1(2),ngc12),
     *              (b4(1),mg),(b4(2),dia)
        data f1/'N00','N10','N20','N30','N40','N50','N60','N70',
     *'N80','S00','S10','S20','S30','S40','S50','S60','S70','S80'/
        data obj/'IC ','NGC'/
        data ngcsp/'Gx ','OC ','Gb ','Nb ','Pl ','C+N','Ast','Kt '/
        write(*,1)
1       format(3(/),19x,
     *'******* find which number NGC (IC) is *******'
     *//30x,'Jiang  2000.7',3(/))
        write(*,'(a,$)')' NGC (include IC) number or M:  '
        read(*,*,err=11)num
        kk=0
        write(*,*)
        write(*,*)
        write(*,*)'  No.     R.A.(2000)Decl.      Mag.  Size'
        do 1000 l=1,18
        open(1,file='/EOD/ngc/'//f1(l)//'.NGC',
     *    status='old',access='direct',recl=512)
        read(1,rec=1)ind
	call swap2(ind,512)
        do 10 i=2,ind(256)
        read(1,rec=i)a
        do 10 j=1,32
        x1=a(1,j)
        x4=a(4,j)
	call swap2(x1,2)
	call swap2(x4,4)
        ic=2
	in=jn
        if(jn.lt.0)then
	  ic=1
          jn=-jn
        endif
        if(jn.gt.num-5.and.jn.lt.num+5)then
         do 30 k=1,kk
         if(in.eq.xx(k))goto 10
30       continue
         kk=kk+1
         xx(kk)=in
	 call swap4(a(2,j),8)
         call toms(a(2,j),ac,1)
         call toms(a(3,j),dc,0)
         k=ngc12(2)
         xmag=mg*0.1
         c5='     '
         if(mg.gt.0)write(c5(1:),"(f4.1,'v')")xmag
         xmag=-xmag
         if(mg.lt.0)write(c5(1:),"(f4.1,'p')")xmag
         c4='    '
         if(ngc12(1).ne.0.and.ic.eq.2)write(c4(1:),"('M',i3)")ngc12(1)
         f5='    '
         if(dia.ne.0)write(f5(1:),'(f5.1)')dia*.1
         dc(7:7)=' '
         write(*,1334)obj(ic),jn,ac(1:9),dc(1:7),ngcsp(k),c5,f5,c4
1334    format(1x,a,i4,6(1x,a))
        endif
10      continue
1000    close (1)
        goto 2000

11      open(1,file='/EOD/ngc/mob.dat')
13      do 12 i=1,21
        if(i.eq.1)write(*,15)
15      format('  No.    NGC_IC      R.A.(2000)Decl.'
     *  '         Size   Mag.')
        read(1,'(a)',end=14)mo
12      write(*,'(1x,a)')mo
        write(*,'(a,$)')'     <return> please '
        read(*,'(a)')i
        goto 13
14      close (1)
2000    end
