	character*(*) function textin (question, default)
	character*(*) question, default
	character*80 answer
	l1 = len (default)
  10	if (default(l1:l1) .ne. ' ' .or. l1 .le. 1) goto 99
  	l1 = l1 - 1
  	goto 10
  99	write (*,20) question, default(:l1)
  20	format ('$','==> ',a,'/',a,'/: ')
  	read (*,'(a)') answer
  	if (answer .eq. ' ') answer = default
  	textin = answer
  	return
  	end
  	
  	logical function boolean (question, default)
  	character*(*) question, default
  	character answer
  	write (*,11) question, default
  11	format ('$','==> ',a,'/',a,'/: ')
   	read (*,'(a)') answer
	if (answer .eq. ' ') answer = default
	if (answer .eq. 'y' .or. answer .eq. 'Y') then
		boolean = .true.
	else
		boolean = .false.
	endif
	return
	end

	function intin (question, idefault)
  	character*(*) question, answer*10
 100	write (*,12) question, idefault
  12	format ('$','==> ',a,'/',i8,'/: ')
   	read (*,'(a)') answer
  	if (answer .eq. ' ') then
  		intin = idefault
  	else
  		read (answer, '(i10)', err=999) ianswer
  		intin = ianswer
  	endif
  	return
 999	print *,'!! illigal data type, use integer !!'
  	goto 100
  	end
	 	
	function realin (question, default)
  	character*(*) question, answer*20
 200	write (*,13) question, default
  13	format ('$','==> ',a,'/',e10.4,'/: ')
   	read (*,'(a)') answer
  	if (answer .eq. ' ') then
  		realin = default
  	else
  		if (index (answer, '.') .eq. 0) then
  			read (answer, '(i10)', err = 989) ianswer
  			realin = ianswer
  		else
  			read (answer, '(f20.10)', err=989) fanswer
  			realin = fanswer
  		endif
  	endif
  	return
 989	print *,'!! illegal data type, use float numbers !!'
  	goto 200
  	end
