        SUBROUTINE LINLAB(NUM,IEXP,STRNG,LRMTEX)
        IMPLICIT NONE
	EXTERNAL LEN
        INTEGER IEXP,ISTART,N,IZBGN,NIN,IBEGIN,I
        LOGICAL*1 LRMTEX
	INTEGER L,NUM,NVAL,LEN
	CHARACTER*1 STRNG(8)
C
        CHARACTER*1 BMINUS, BZERO(4)
        DATA BMINUS /'-'/
        DATA BZERO /'0', '.', '0',0/
C
C
        LRMTEX = .TRUE.
C
C       WORK WITH ABSOLUTE VALUE AS IT IS EASIER TO PUT SIGN IN NOW
C
        IF (NUM .LT. 0) GO TO 10
                NVAL = NUM
                ISTART = 1
                GO TO 20
10          CONTINUE
                NVAL = -NUM
                ISTART = 2
                STRNG(1) = BMINUS
20      CONTINUE
        IF (IEXP .GE. -2 .AND. IEXP .LE. 2) LRMTEX = .FALSE.
        IF (IEXP .GT. 0 .AND. (.NOT. LRMTEX)) NVAL = NVAL*10**IEXP
C
	CALL NUMSTR(NVAL,STRNG(ISTART))
C
        IF ((NVAL .EQ. 0) .OR. LRMTEX .OR. (IEXP .GE. 0)) GOTO 800
C
C       NUMBER IS IN RANGE 10**-1 OR 10**-2, SO FORMAT PRETTY
C
        N = -IEXP
        L = LEN(STRNG(ISTART))
        IZBGN = 1
        NIN = 3
        IF (N .EQ. L) NIN = 2
C
C       IF N<L THEN WE NEED ONLY INSERT A DECIMAL POINT
C
        IF (N .GE. L) GO TO 40
                IZBGN = 2
                NIN = 1
40      CONTINUE
C
C       ALLOW ROOM FOR DECIMAL POINT AND ZERO(S) IF NECESSARY
C
        IBEGIN = ISTART + MAX0(0,L-N)
                DO 50 I = 0, MIN0(N,L)
                STRNG(ISTART+L+NIN-I) = STRNG(ISTART+L-I)
50              CONTINUE
C
C       INSERT LEADING ZEROS IF NECESSARY, OR JUST DECIMAL POINT
C
                DO 60 I=0,NIN-1
                STRNG(IBEGIN+I) = BZERO(IZBGN+I)
60              CONTINUE
C
C       ALL DONE
C
800	CONTINUE
        RETURN
        END
