	.ENABLE SUBSTITUTION
	.ENABLE GLOBAL
	.ENABLE ESCAPE
	.SETS FNTP ""
	.SETN FUNSZ 0
	.SETS I1 "PROGRAM"
	.SETS I2 "FUNCTION"
	.SETS I3 "SUBROUTINE"
	.GOTO	A1
.A2:	;THE FOLLOWING:
	; 1) 'I1'
	; 2) 'I2'
	; 3) 'I3'
	.SETS RET "	RETURN"
.A1:	.ASKN PT PROGRAM TYPE
	.IFT <ESCAPE> .GOTO A2
	.SETS PROTYP  I'PT'
	.IF PT = 1 .SETS RET ""
	.IF PT NE 2 .GOTO B
	.SETS I1 "INTEGER"
	.SETS I2 "REAL"
	.SETS I3 "LOGICAL"
	.SETS I4 "COMPLEX"
	.GOTO A10
.A10A:	; FUNCTION TYPES ARE
	; 1) 'I1'
	; 2) 'I2'
	; 3) 'I3'
	; 4) 'I4'
.A10:	.ASKN Z FUNCTION TYPE
	.IFT <ESCAPE> .GOTO A10A
	.IF Z LE 0 .GOTO A10A
	.SETS FNTP  I'Z'
.A10B:	;SET WORD RANGE TYPE IN ONE OF:
	; 1, 2, 4, 8.  COMPLEX REQUIRES 8.
	;
	.ASKN FUNSZ FUNCTION SIZE
	.IF FUNSZ = 1 .GOTO B
	.IF FUNSZ = 2 .GOTO B
	.IF FUNSZ = 4 .GOTO B
	.IF FUNSZ = 8. .GOTO B
	.GOTO A10B
.B:
	.SETS TMPZ "()"
	.IF PT = 1 .SETS TMPZ ""
	.SETS TMPE ""
	.IF PT EQ 2 .SETS TMPE "*"+"'FUNSZ'"
.ENABLE DATA #0
	'FNTP' 'PROTYP' '$TITL' 'TMPE' 'TMPZ'
 
 
C	*************************************************
C	*	SPECIFICATION STATEMENTS		*
C	*************************************************
C
C
C	*************************************************
C	*	PROGRAM STATEMENTS			*
C	*************************************************
C
C
C
C	*************************************************
C	*	FORMAT STATEMENTS			*
C	*************************************************
C
C
	END
.DISABLE DATA #0
	.IFF $MORM .GOTO END
.ENABLE DATA
'$FORM'
'$PCS''$SC'
.DISABLE DATA
	.CHAIN [17,377]GENSRC
.END:
	.CLOSE #0
/
