	CHARACTER*50 FUNCTION FORMNUM(X,idec,ilen)
C returns a string version of a floating point number, leading spaces
C are removed. 
C	X 	is the number to be formatted
C	idec	is the number of decimal places
C	ilen 	is the length of the string (returned)
	Character*50 temp
	write (temp,101) x
101	format(f50.<idec>)
	do i=50-idec-1,1,-1
	  if (temp(i:i) .eq. ' ') then
	    j = i+1
	    goto 102
	  endif
	enddo
	j = 1
102	FORMNUM = temp(j:)
	ilen = 51-j
	RETURN
	END
