C
C SWRT - WRITE VARIABLE LENGTH STRING TO SCREEN WITHOUT
C RECORD TERMINATION.
C COPYRIGHT GLENN C EVERHART 1984
C ALL RIGHTS RESERVED
C
C
	SUBROUTINE SWRT(STRING,LENGTH)
	LOGICAL*1 STRING(127)
C ALLOW CALLS FROM FORTRAN 66 ROUTINES TO BE DONE NATURALLY
C E.G.
C	CALL SWRT('STRING',NCHARS)
	INTEGER*2 LENGTH
C DUMP OUT ALL WE CAN..
	CHARACTER*7 SFM
	CHARACTER*1 SFMX(7)
	CHARACTER*3 SNM
	EQUIVALENCE(SNM,SFMX(2))
	EQUIVALENCE (SFMX(1),SFM)
C HERE ARE THE BUILT IN FORMATS. NOTE WE FILL IN THE
C REPEAT COUNT AT RUNTIME FOR THE TEXT TO BE WRITTEN.
C NOTE ALSO THAT THE 1ST CHAR IS A # SIGN TO SHOW UP PROBLEMS.
C FORMATS ARE (nnnA1)
C COMPRISING 13 CHARACTERS IN ALL.
	DATA SFM/'(001A1)'/
C NOTE WE JUST FILL IN THE LENGTH AND WRITE TO SCREEN USING
C SFM AS A RUNTIME FORMAT.
C
	IF(LENGTH.LE.0)RETURN
	WRITE(SNM,1)LENGTH
1	FORMAT(BZ,I3)
C WRITE ON UNIT 6 WHICH IS OUR SPECIALLY OPENED CONSOLE OUTPUT UNIT
C (VIA EXPLICIT OPEN IN MAIN PROGRAM)
	WRITE(6,SFM)(STRING(II),II=1,LENGTH)
	RETURN
	END
