' ARGUMENT.BAS
' This program demonstrates passing arguments to a subprogram.

DECLARE SUB AddInterest (monthName$, amount!)

month$ = "January"               ' initialize month$ with value
                                 '   of "January"
balance! = 1500                  ' initialize balance! with value of 1500

CLS

PRINT "Before subprogram:"       ' display original values
PRINT "  month$ = "; month$
PRINT "  balance! ="; balance!
PRINT

AddInterest month$, balance!     ' call subprogram to modify values

PRINT "After subprogram:"        ' display modified values
PRINT "  month$ = "; month$
PRINT "  balance! ="; balance!

END

SUB AddInterest (monthName$, amount!)

monthName$ = "February"          ' change name of month
amount! = amount! * 1.05         ' add 5% to amount

END SUB

