home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
NEWS
/
554
/
JUIN
/
PROCFIND.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-07
|
1KB
|
54 lines
{─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 399 of 591
From : John Dailey 1:374/38.0 23 Jun 93 15:56
To : Dale Barnes 1:3601/200.0
Subj : Program Wanted : Try This
────────────────────────────────────────────────────────────────────────────────
DB> Does anyone know of any program that will scan an entire
DB> programs pascal source code and give a listing of each
DB> procedure/function in each file?
Well, that doesn't sound too hard. Lesse if I can help. Try this one on for
size, and if it doesn't work, don't blame me <laughs>!}
Program Find_Procs_And_Funcs(input, output);
Uses Crt, Dos;
Var
filename : String;
Procedure Ucase(Var line_to_do : String);
Var
n : Byte;
Begin
For n := 1 To Length(line_to_do) Do
line_to_do[n] := Upcase(line_to_do[n]);
End;
Procedure Do_File;
Var
line,
tline : String;
infile : Text;
Begin
Assign(infile, filename);
Reset(infile);
While Not Eof(infile) Do
Begin
Readln(infile, line);
tline := line;
Ucase(tline);
If (Pos('PROCEDURE', tline) <> 0) Or (Pos('FUNCTION', tline) <> 0) Then
Writeln(line);
End;
Close(infile);
End;
Begin
Writeln('Find Procs_And_Funcs');
Writeln;
Write('Filename : ');
Readln(filename);
Do_File;
End.