home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Lion Share
/
lionsharecd.iso
/
dos_misc
/
qcalc113.zip
/
SAMPLE.QC
< prev
next >
Wrap
Text File
|
1991-10-30
|
1KB
|
64 lines
;
; SAMPLE.QC
;
; This is a sample file for QCALC. To use, type QCALC @SAMPLE.VAR
;
#
# Script: SAMPLE.QC
#
# An application: What to tell the boss? (Hit a key, or ESC to abort.)
~ ; Pause
#
# 1) Turn on financial printing. This tells QCALC to print numbers
# with a dollar sign, commas, and two decimal places.
~
#
#/F
/f ; Turns on Financial Printing
~
#
# 2) Create two variables. AMOUNT will store actual spending, and
# LIMIT will store the budget.
~
#
# The boss says, never go over $10,000 ...
limit:10000 ; Defines a second variable
~
#
# However, you have spent ... (enter amount)
!amount ; Input amount, and place in variable amount
#
# 3) Now, if our spending is greater than our budget, then tell the boss
# we've met the budget. Otherwise, tell the boss the true amount.
~
#
if(amount>limit,limit,amount) ; Calculate which is greater
~
#
# 4) Gee, I hope we're not over budget. If we are, the boss
# will look for some ways to cut costs (you). And if we
# aren't, the boss won't believe you and you'll get the
# can that way. Either way, thanks to QCALC, you're fired!
#
# Will wonders never cease?
#
~
# Here's how to do it without a script ... type:
#
# QCALC /f amount:12852.29 limit:10000 if(gt(amount,limit),limit,amount)