PROGRAM d6r4(input,output,dfile); (* driver for routine FACTLN *) VAR i,n,nval : integer; val : real; txt : string[11]; dfile : text; gla : ARRAY [1..100] OF real; (*$I MODFILE.PAS *) (*$I GAMMLN.PAS *) (*$I FACTLN.PAS *) BEGIN FOR i := 1 to 100 DO gla[i] := -1.0; (* initialize FACTLN *) glopen(dfile,'fncval.dat'); REPEAT readln(dfile,txt) UNTIL (txt = 'N-factorial'); readln(dfile,nval); writeln ('log of n-factorial'); writeln ('n':6,'actual':19,'factln(n)':21); FOR i := 1 to nval DO BEGIN readln(dfile,n,val); writeln (n:6,ln(val):20:7,factln(n):20:7) END END.