Sunday, March 3, 2019

LOAN1

Table of Contents
List of Example Programs

LOAN1 Disk Image

LOAN1 is a program that appears on page 66 (listing 5-7) of the book "Pascal Primer" by David Fox and Mitchell Waite. This program demonstrates how to calculate the regular payment on a loan. The comments state that the program was written by Mitch Waite.


The original Pascal source code from the book was written for the Apple II family of personal computers using UCSD Pascal.



The Atari Pascal Language System version of the program was created in an Altirra emulator-based Development Environment using the AtariWriter 80 word processor as the source code editor.

I made a few tweaks to the original Apple II/UCSD Pascal program to clear the Atari text screen and to keep the program from ending prematurely. Also, since we are using REAL number variables in this program, we MUST include the floating point library (FPLIB) when linking or the program will crash when run.

The link command looks like:

LINKER V1.0
*D2:LOAN1,FPLIB,PASLIB/S

When you run the program, it looks like:


The next sample program cleans up the e-notation output.

No comments:

Post a Comment