Category : Pascal Source Code
Archive   : USNGTP.ZIP
Filename : LST09-01.PAS
{$I STD-CTV.PAS Global constants, types and variables }
{$I STD-UTIL.PAS Miscelaneous global subprograms }
{$I STD-INP.PAS Keyboard input subprograms }
{$I STD-DISP.PAS Video display subprograms }
{ Global constants, types and variables specific to the
the Loan_Amortization program. }
const ACCEPT = 'A'; { Action codes. }
MODIFY = 'M';
PRINT = 'P';
END_INP = 16; { Last input field on the input screen.}
var action : Char;
exit : Boolean;
{ Subprogram stubs for the Loan_Amortization program. }
procedure Initialize;
begin
ClrScr; WriteLn('Initializing...');
err_flag := FALSE;
exit := FALSE;
end; { Initialize }
procedure Select_Loan_File;
begin
WriteLn('Select Loan File. Press
Read(Kbd,inchr);
if (inchr = QUIT) then
esc_flag := TRUE
else
esc_flag := FALSE;
end; { Select_Loan_File }
procedure Display_Current_Values;
begin
WriteLn('Display Current Values');
end; { Display_Current_Values }
procedure Select_Action;
begin
WriteLn('Select Action. Press
Read(Kbd,inchr);
if (inchr = QUIT) then
esc_flag := TRUE
else
esc_flag := FALSE;
action := UpCase(inchr);
end; { Select_Action }
procedure Accept_Data;
begin
WriteLn('Accept Data');
end; { Accept_Data }
{ }
procedure Modify_Data(first_fld, last_fld: Byte);
begin
WriteLn('Modify Data');
end; { Modify_Data }
procedure Print_Amortization_Table;
begin
WriteLn('Print Table');
end; { Print_Amortization_Table }
procedure Display_Help;
begin
WriteLn('Display Help');
end; { Display_Help }
procedure Exit_Housekeeping;
begin
WriteLn('Exit Housekeeping')
end; { Exit_Housekeeping }
begin { Loan_Amortization }
Initialize; { Do initial housekeeping.}
while (not (err_flag or exit)) do
begin
Select_Loan_File;
if esc_flag then
Verify_Exit;
while (not (esc_flag or err_flag)) do
begin
Display_Current_Values;
Select_Action;
case action of
ACCEPT : Accept_Data;
MODIFY : Modify_Data(1,END_INP);
PRINT : begin
Accept_Data;
Print_Amortization_Table;
end;
QUIT : Exit_Housekeeping;
HELP : Display_Help;
end; {case}
end; {while}
end; {while}
ClrScr; Write('Session Ended');
end. { Loan_Amortization }
{ Listing. 9-1 Loan_Amortization program with `stubs'
replacing the top level modules. }
{ }
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/