C -----------------------------------------------------------
      subroutine blet2(ilet,alet2)
c

	CHARACTER*1 IN(0:9)
C	integer*2 ilet
	DATA IN/'0','1','2','3','4','5','6','7','8','9'/
	CHARACTER*2 alet2
	a2='00'
	j10=ilet/10
	j1=ilet-j10*10
    5	do i=0,9
	if (j10.eq.i) then
	alet2(1:1)=IN(i)
	endif
	enddo
   7	do i=0,9 
     	if (j1.eq.i) then
 	alet2(2:2)=IN(i)
	endif
	enddo 
	return
	end
C--------------------------------------------------------------------------------
C
      subroutine blet3(ilet,alet3)
c     nn=1,2,3,4 

	CHARACTER*1 IN(0:9)
	DATA IN/'0','1','2','3','4','5','6','7','8','9'/
	CHARACTER*3 alet3
	a3='000'
C
	j100=ilet/100
	      j10=(ilet-j100*100)/10
	j1=ilet-j100*100-j10*10
    3	do i=0,9
		if (j100.eq.i) then
	alet3(1:1)=IN(i)
	endif
	enddo
    5	do i=0,9
	if (j10.eq.i) then
	alet3(2:2)=IN(i)
	endif
	enddo
   7	do i=0,9 
     	if (j1.eq.i) then
 	alet3(3:3)=IN(i)
	endif
	enddo 
	return
	end
C
C ===============================================================
      subroutine readpar(alet5,iread,Z1,Z2)
c     nn=1,2,3,4,5 

	CHARACTER*1 IN(0:10),Z1,Z2,Z,AB(26)
	integer iread, ires(3)
	DATA IN/'0','1','2','3','4','5','6','7','8','9',' '/
	DATA AB/'A','B','C','D','E','F','G','H','I','J','K','L','M','N'
	+,'O','P','Q','R','S','T','U','V','W','X','Y','Z'/
	CHARACTER*5 alet5
C
       Z1=' '
	Z2=' '
	iread=0
	do j=1,3
	ires(k)=-1
	enddo
C
       kz1=1
	kz2=5
      Z=ALET5(1:1)
	do i=1,26
	if (Z.eq.AB(i)) then
	Z1=Z
	kz1=2
	exit
	endif
	enddo
C
       k1=kz1
	 icnt=0
      DO 10 k=kz1,kz2
	Z=ALET5(k:k)
	IF (Z.eq.IN(10)) THEN		  !1
	goto 5
                        ELSE		  !1
C
    3	do i=0,9
		if (Z.eq.IN(i)) then   !2
	icnt=icnt+1
	ires(k)=i
	exit
                endif			   !2
	enddo
	                        ENDIF  !1
C							   
  10	continue
    5	CONTINUE
C+       if (icnt.eq.0) then 
c+	Z1=ALET5(1:1)
c+	Z2=ALET5(5:5)
c+	 goto 11
c+	               else
c+	 Z1=ALET5(icnt+1:icnt+1)
c+	Z2=ALET5(icnt+2:icnt+2)
c+	           endif
      k1=k1+icnt
       Z=ALET5(k1:k1)
	do i=1,26
	if (Z.eq.AB(i)) then
	Z2=Z
	exit
	endif
	enddo

       if (icnt.eq.1) iread=ires(1)
	if (icnt.eq.2) iread=ires(1)*10+ires(2)
	if (icnt.eq.3) iread=ires(1)*100+ires(2)*10+ires(3)
   11	return
	end
C
