	SUBROUTINE SLEND(RETCD)
C COPYRIGHT (C) 1983 GLENN EVERHART
C PERMISSION IS GIVEN TO ANYONE TO USE, DISTRIBUTE, OR COPY THIS
C PROGRAM FREELY BUT NOT TO SELL IT COMMERICALLY.
	INCLUDE 'VKLUGPRM.FTN'
C	PARAMETER RRW = 32
C	PARAMETER RCL = 32
C RRW=MAX REAL ROWS
C RCL=MAX REAL COLS
C RRW MUST BE 1 LARGER TO HANDLE 1ST 27 VARIABLES IN AVBLS
C VBLS AND TYPE DIMENSIONED RRW,RCL
C **************************************************
C *                                                *
C *         SUBROUTINE   SLEND(RETCD)              *
C *                                                *
C **************************************************
C
C
C
C SETS VALUE OF LEND, POINTER TO LAST NON-BLANK CHARACTER
C IN LINE(80)
C
C
C
C
C RETCD VALUE       MEANING
C
C    1            NORMAL RETURN
C    2            ALL BLANKS
C
C
C
C   SLEND IS CALLED BY CALC
C
C
C MODIFY CLASSES: M2
C
C
C VARIABLE    USE
C
C  BLANK      ' '
C    I        INDEXES CHARACTERS IN LINE(80).
C  LEND       UPON EXIT, POINTS TO THE LAST NON-
C             BLANK IN LINE(80).
C  LINE(80)   HOLDS COMMAND LINE.
C  RETCD      RETURN CODE.  1=NORMAL, 2=ALL BLANKS
C
C
C
C	SUBROUTINE SLEND(RETCD)
	INTEGER*2 LEVEL,NONBLK,LEND
	INTEGER*2 VIEWSW,BASED,RETCD
C
	LOGICAL*1 ALPHA(27),COMMA,BLANK,RPAR,LPAR,EQ
	LOGICAL*1 LINE(80)
C
	COMMON LEVEL,LINE,NONBLK,LEND,VIEWSW,BASED
	COMMON /CONS/ ALPHA,COMMA,BLANK,RPAR,LPAR,EQ
C
C
C
C
	RETCD=1
	DO 100 I=1,80
	IF(LINE(81-I).NE.BLANK)GO TO 200
100	CONTINUE
	RETCD=2
	RETURN
200	LEND=81-I
	RETURN
	END
