1	SUBROUTINE LDENS (IN,N,IFMW,L,M,MIN,ISTEP, IOUT)?C_Titl  LDENS convert integer array to character density array C_Arguments8	INTEGER*2 IN(*)	! [I] array of integers to be converted.	INTEGER   N	! [I] number of items to convert.2	INTEGER IFMW	! [I] format field width to be used.?	INTEGER   L	! [I] control's the character and density scaling.DC 1's digit:  	0 =    nominal shading sequence:  '.^|<=;}ZYX0%H8@:V#9C 		1 = more rapid shading sequence:  '.^<;Z@:IVS*#234567)C		3 = users symbol sequence input in  M.FC 10's digit:	number of shading-characters for each field  (<=IFORM) .4C 100's digit:	scaling, 0 = linear; 1 = logrithmic. A	BYTE M(*)	! [i] optional array of characters to use for shading.H	INTEGER MIN ! [i] base value for linear scheme. not used for logrithmic$C			(min+1 is first non-blank entry)G	INTEGER ISTEP  ! [i] linear step size. not used for logrithmic scalingB	BYTE IOUT(*) ! [o] array for  ASCII characters. there will be  N ?C		contiguous fields , each of  IFMW characters, the right-mostAC		1 or more of which will contain the density-shading character.C_Desc NC Convert linear array to character density array, conversion can be based on EC linear or  LOG2 scale.  The user must construct the output  FORMAT 
C statement. C_Call  A2AN  ISHFT C_Hist	79apr22  Hugh_H_Kieffer  1C	83jan07  R.Mehlman  UCLA  incorporation of  LG2/C	87oct19  HHK redo documentation and structureCC	88nov14  HHK major revision, including argument order and meaningC_End)	LOGICAL LOG	! true if logrithmic scaling	INTEGER*2 INI1	BYTE ID(22)	!  ID will hold the characters used 	DATA ID(21),ID(22)/1H-,1H+ /-	BYTE IC(40) /	! holds basic density patterns<     & 1H ,1H',1H.,1H^,1H|,1H<,1H=,1H;,1H},1HZ ! 1 = nominalD     &,1HY,1HX,1H0,1H%,1HH,1H8,1H@,1H:,1HV,1H# !  '.^|<=;}ZYX0%H8@V#@     &,1H ,1H',1H.,1H^,1H<,1H;,1HZ,1H@,1H:,1HI ! 21 = more rapidF     &,1HV,1HS,1H*,1H#,1H2,1H3,1H4,1H5,1H6,1H7/ !  '.^<;Z@:IVS*#2345675	K100 = L/100		! get 100's digit from control integer	K = L-K100*100	K10 = K/10		! get 10's digit	K = K-K10*10		! get 1's digit$	LOG = (K100.EQ.1)	! logrithmic flag3	NC = K10		! number of density characters per field	IF (NC.LT.1) NC = 1	IF (NC.GT.IFMW) NC=IFMW5C transfer character sequence into working array  ID.	IF (K.GT.2) THEN4		CALL A2AN (M,ID,10)	! use caller's character array(	    ELSE			! use pre-stored characters '		II = 1			! point to proper symbol set		IF (K.EQ.2) II=21		CALL A2AN (IC(II),ID,10)
	    ENDIF	IS = ISTEP		! linear step size)	IF (IS.EQ.0) IS=1	! avoid divide_by_zero'	IO = MIN+1-IS-IS	! linear density baseE	IF (IFMW.GT.NC) CALL FILL (IOUT,(N*IFMW+1)/2,'  ') ! blank the array%	II = 0			! location of output symbol%	DO K=1,N		! convert each input value(	  IF (LOG) THEN	! logrithmic conversion@CC		J = LG2(IN(I))+1  ! [replaced by right shift till word is 0]
		INI = IN(K)
		DO J = 1,17		  	IF (INI.EQ.0) GO TO 5			INI = ISHFT(INI,-1)			ENDDO	  ELSE		! linear conversion		J = (IN(K)-IO)/IS		IF (J.GT.20) J = 22		IF (J.LT.1) J = 21
	    ENDIF*5	  DO I=1,NC	! fill in the density symbol		IOUT(I+II) = ID(J)		ENDDO
	  II=II+IFMW	ENDDO	RETURN	END