T.R | Title | User | Personal Name | Date | Lines |
---|
1224.2 | Strip off the notes info first.... | SAC::DELANY_S | | Thu Sep 13 1990 13:55 | 4 |
| Sorry, forgot to mention that when you extract the program, you'll have
to strip off the notes information from the top.
S
|
1224.3 | Tints and hips! | UKCSSE::RDAVIES | Live long and prosper | Thu Sep 13 1990 14:45 | 3 |
| Or save/noheader thingy.wotsit
Richard
|
1224.4 | | COMICS::WEGG | Some hard boiled eggs & some nuts | Thu Sep 13 1990 15:32 | 8 |
| or better:
Notes> extract/nohead lease.bas
$ basic lease
$ link lease
$ run lease
Ian.
|
1224.5 | Whoops... | SAC::DELANY_S | | Thu Sep 13 1990 17:51 | 13 |
| Grovel grovel grovel.....
Sorry, a little "bugette" crept into V1.0 of the program, if you
happened to have a quote that was less than any supplement you might
receive (I hadn't tested this properly, as I don't get a supplement!):
the next reply contains V2.0 of the program that hopefully now works
properly (with V1.0, I was just making sure of getting a product to
market, then testing it fully on the customers :-) )
Rgds,
S
|
1224.6 | The CORRECT program | SAC::DELANY_S | | Thu Sep 13 1990 17:52 | 25 |
| 10 REM Prog. to calc. annual cost of any lease car, incl. fuel and lease cost
20 INPUT "What is your annual business mileage",B
30 INPUT "What is your annual private mileage",P
40 INPUT "What is the current fuel price per gallon",F
50 INPUT "What is the current business mileage rate",R
60 INPUT "What is the annual quote for your lease car",Q
62 INPUT "What car supplement do you get",S
65 INPUT "What type of car is this",n$
68 INPUT "Enter your tax liability for your car's cc",T
70 INPUT "Enter the lowest anticipated mpg for your car",L
80 INPUT "Enter the highest anticipated mpg for your car",H
82 PRINT
83 PRINT
85 PRINT "TABLE OF ANNUAL COST FOR THE ";n$;", FOR A GIVEN RANGE OF MPG"
87 PRINT
90 PRINT "Mpg","Total Annual Car/Fuel Cost"
100 PRINT
110 FOR C = L TO H STEP 1
115 IF Q>S THEN PRINT C,((Q-S)*0.75)+(T*0.25)+(((P+B)/C)*F)-(B*R) ELSE PRINT C,(T*0.25)-((S-Q)*0.75)+(((P+B)/C)*F)-(B*R)
140 NEXT C
145 PRINT
146 PRINT
147 PRINT "THE PROGRAM IS NOW RUNNING AGAIN. PLEASE TYPE CTRL/Z TO EXIT"
150 GOTO 20
|
1224.7 | VAX Basic version...easier to understand :-) | OVAL::ALFORDJ | Ice a speciality | Fri Sep 14 1990 15:56 | 74 |
|
---------------------------------- cut here -----------------------------------
program lease_cost
! Prog. to calc. annual cost of any lease car, incl. fuel and
! lease cost
declare word exit_prog &
,gfloat buis_miles &
, priv_miles &
, quote &
, suppl &
, cc &
, low_mpg &
, high_mpg &
, mile_rate &
, fuel &
,string car_type
Exit_prog = 0
ask_again:
When Error In
Print "Please type CTRL/Z to exit"
Print
Input "What is your annual business mileage", buis_miles
Input "What is your annual private mileage", priv_miles
Input "What is the current fuel price per gallon", fuel
Input "What is the current business mileage rate", mile_rate
Input "What is the annual quote for your lease car", quote
Input "What car supplement do you get", suppl
Input "What type of car is this", car_type
Input "Enter your tax liability for your car's cc", cc
Input "Enter the lowest anticipated mpg for your car", low_mpg
Input "Enter the highest anticipated mpg for your car", high_mpg
Use
Exit_prog = -1
End When
goto finish_up if Exit_prog
Print for x = 1 to 2
Print "Table of annual cost for the ";car_type;", for a given range of MPG"
Print
Print "Mpg","Total Annual Car/Fuel Cost"
Print
FOR C = low_mpg TO high_mpg
If quote>suppl
Then
Print C &
,((quote-suppl)*0.75) &
+(cc*0.25) &
+(((priv_miles+buis_miles)/C)*fuel) &
-(buis_miles*mile_rate)
Else
Print C &
,(cc*0.25)-((suppl-quote)*0.75) &
+(((priv_miles+buis_miles)/C)*fuel) &
-(buis_miles*mile_rate)
End If
Next C
Print for x = 1 to 2
GOTO ask_again
finish_up:
end program 0
|
1224.8 | Slight rathole... | CURRNT::RUSSELL | Middle-aged Mutant Hero Turtle (UK option) | Mon Sep 17 1990 14:04 | 8 |
| re.7;
Well, Jane, I agree that it's easier to understand, but I still
can't come to grips with programs that don't have line numbers on
them!
Peter.
|
1224.9 | more rathole ! | OVAL::ALFORDJ | Ice a speciality | Tue Sep 18 1990 14:29 | 10 |
|
> Well, Jane, I agree that it's easier to understand, but I still
> can't come to grips with programs that don't have line numbers on
> them!
That's about when you stopped being a *real* programmer and moved into the
Management levels wasn't it ?
:-)
|
1224.10 | Rathole closure. | CURRNT::RUSSELL | Middle-aged Mutant Hero Turtle (UK option) | Tue Sep 18 1990 16:21 | 13 |
|
re.9;
>That's about when you stopped being a *real* programmer and moved into the
>Management levels wasn't it ?
Jane, I resent that suggestion - I never moved into Management;
I'm a consultant....
Peter.
P.S. but you are right; I don't do real programming any more!
|
1224.11 | I did say "Management Levels"... | OVAL::ALFORDJ | Ice a speciality | Wed Sep 19 1990 10:31 | 3 |
|
:-)
|