BBS: Inland Empire Archive Date: 03-28-93 (15:11) Number: 193 From: CHARLES GRAHAM Refer#: NONE To: ALL Recvd: NO Subj: 5 of 6 AMORTIZE.BAS Conf: (2) Quik_Bas
'Begin AMORTIZE.BAS Message 05
'
LPRINT "Amount of loan = ";
LPRINT USING "#######.##"; amt#
LPRINT "Monthly payment = ";
LPRINT USING "#######.##"; pmt#
LPRINT "Annual Percentage Rate = ";
LPRINT USING "#####.####"; rate
LPRINT "Term of loan [months] = ";
LPRINT USING "###"; n
LPRINT
LPRINT "PMT DATE INT PAID PRIN PAID TOT INT " + _
"PAID TOT PRIN PD PRINCIPL BAL"
LPRINT
END IF
RETURN
' ** Replace this with a blank line **
validate:
errct = 0
decpts = 0
FOR x = 1 TO LEN(quan$)
IF (MID$(quan$, x, 1) < "0" AND MID$(quan$, x, 1) <> _
".") OR MID$(quan$, x, 1) > "9" THEN
errct = errct + 1
END IF
IF MID$(quan$, x, 1) = "." THEN
decpts = decpts + 1
END IF
NEXT x
IF decpts > decimals THEN
errct = errct + 1
END IF
IF errct = 0 THEN
IF VAL(quan$) < loball OR VAL(quan$) > hiball# THEN
errct = errct + 1
END IF
END IF
IF errct = 0 THEN
validated$ = "on"
END IF
RETURN
' ** Replace this with a blank line **
pause:
a$ = ""
WHILE a$ = ""
a$ = INKEY$
WEND
IF a$ = CHR$(27) THEN
COLOR 7, 0
CLS
END
END IF
RETURN
'
'End AMORTIZE.BAS Message 05
--- QM v1.30
* Origin: QwikCom * St Charles MO * 16.8K HST/V32b (1:100/602.0)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET