Holiday Expenses   (Model A)


Calculate all your currency needs for a trip through several countries. Approximate exchange rates are included for 19 currencies and you may enter others as you wish. Four currencies are handled at one time by the holiday costs and cross-rates pages and there are twelve holiday costs categories ranging from hotel bills to phone calls and gifts for the folk back home. Enter your anticipated costs in each of the four currencies, press a key and see the total in sterling.

    1 REM *** BBC VERSION ***
    2 REM *** HOLIDAY EXPENSES ***
   10 E$="1  1 5 10 5010500"
   20 DIMC$(12),C(13,4),N$(4),R(4)
   30 CF=0:TF=0:VF=0:N=1:CY=1:FG=0:T=0
   40 GOTO700
   50 VDU28,5,23,37,3:CLS
   60 PRINT" 1     2      3      4      5"
   70 PRINTCHR$&85"STG"TAB(5)N$(1)TAB(12)N$(2
)TAB(19)N$(3)TAB(26)N$(4)
   80 FORX=1TO6:Z$=MID$(E$,X*3-2,3):PRINTTAB(
0,X+2)Z$"="
   90   FORY=1TO4
  100     Q$=STR$(R(Y)*VAL(Z$))
  110     Q=VAL(Q$)
  120     PRINTTAB(Y*7-2,X+2);Q
  130     NEXTY,X
  140   PRINTTAB(0,17)"Enter 2 column numbers
 (eg 32)   to display cross-rates ("N$(2)"/"N
$(1)").";
  150   INPUT"Or 'M' for menu "X$
  160   IFX$="M" GOTO900
  170   IFLEN(X$)<>2 GOTO140
  180   F=VAL(MID$(X$,2,1))-1:S=VAL(MID$(X$,1
,1))-1
  190   IFS<0 OR S>4 OR F<0 OR F>4 GOTO140
  200   IFS=0 Q=R(F):J$=N$(F):K$="STG":GOTO24
0
  210   IFF=0 Q=1/R(S):J$="STG":K$=N$(G):GOTO
240
  220   Q=R(F)/R(S)
  230   J$=N$(F):K$=N$(S)
  240   M=1
  250   Q=VAL(LEFT$(STR$(Q),4))
  260   C=Q:PRINTTAB(0,10):W=VPOS:REPEAT:VDU3
2:UNTILW+6=VPOS:PRINTTAB(0,10)" "K$TAB(11)J$
  270   FORX=1TO6:Z=M*VAL(MID$(E$,X*3-2,3))
  280     Q=C*VAL(MID$(E$,X*3-2,3))
  290     PRINTTAB(1,X+10);Z;TAB(5)"="TAB(10)
;Q
  300     NEXTX
  310   PRINTTAB(0,17)STRING$(90," ")TAB(0,17
)"Enter amount of "K$" or "J$" to seeequivale
nt. eg "J$"5000"
  320   INPUT"or 'M' for menu "X$
  330   IFX$="M" GOTO900
  340   IFLEN(X$)<4 GOTO140
  350   IFLEFT$(X$,3)=K$ Y=VAL(MID$(X$,4,8)):
X=Y*C/M:GOTO380
  360   IFLEFT$(X$,3)=J$ X=VAL(MID$(X$,4,8)):
Y=X*M/C:GOTO380
  370   GOTO140
  380   PRINTTAB(16,12)" "J$TAB(25,12)K$TAB(1
6,13)"                "TAB(17,13);LEFT$(STR$(
X),6);TAB(25,13);LEFT$(STR$(Y),6)
  390   GOTO310
  400   CLS
  410   PRINTTAB(10)"M"TAB(16)"N"TAB(22)"O"TA
B(28)"P"
  420   PRINT"Charges"TAB(9)N$(1)TAB(15)N$(2)
TAB(21)N$(3)TAB(27)N$(4)
  430   FORX=1TO12:PRINTTAB(0,X+2)CHR$(X+64)"
>"C$(X):NEXT
  440   FORX=1TO12:FORY=1TO4:PRINTTAB(2+6*Y,X
+2);C(X,Y):NEXTY,X
  450     IFTF=1 TF=0:GOTO580
  460     IFCF=0 GOTO520
  470     CF=0
  480     PRINTTAB(0,17)"Enter charge code le
tter with new   name (eg BTOURS)    "
  490     INPUT"Or enter 'M' for menu."X$:IFX
$="M" GOTO900
  500     IFX$="" OR LEN(X$)<2 OR LEFT$(X$,1)
<"A" OR LEFT$(X$,1)>"L" GOTO480
  510     C$(ASC(X$)-64)=MID$(X$,2,5):FORX=1T
O12:PRINTTAB(0,X+2)CHR$(X+64)">"C$(X):NEXT:GO
TO480
  520     PRINTTAB(0,17)"To enter a cost item
 enter          row/column with amount (eg AM
10)"
  530     INPUT"Or enter 'M' for menu."X$:IFX
$="M" GOTO900
  540     IFX$="" GOTO520
  550     IFLEFT$(X$,1)<"A" OR LEFT$(X$,1)>"L
" OR MID$(X$,2,1)<"M" OR MID$(X$,2,1)>"P" OR 
LEN(X$)<3 GOTO520
  560     Q=VAL(MID$(X$,3,5)):C(ASC(X$)-64,AS
C(MID$(X$,2,1))-76)=Q:PRINTTAB(2+6*(ASC(MID$(
X$,2,1))-76),ASC(X$)-62);Q
  570     GOTO520
  580     T=0:FORX=1TO4:C(13,X)=0:NEXTX:FORX=
1TO12:FORY=1TO4:C(13,Y)=C(13,Y)+C(X,Y):NEXTY,
X
  590       FORX=1TO4:IFC(13,X)=0 GOTO610
  600         C(3,X)=VAL(MID$(STR$(C(13,X)),1
,5))
  610         NEXTX
  620       PRINTTAB(8,15);C(13,1)TAB(14,15);
C(13,2)TAB(20,15);C(13,3)TAB(26,15);C(13,4)
  630       PRINTTAB(0,15)"Totals"CHR$&83;TAB
(0,16)"RATE"CHR$&85;TAB(0,17)"STG `"CHR$&82
  640       FORX=1TO4
  650         PRINTTAB(2+6*X,16);R(X):Q=VAL(M
ID$(STR$(C(13,X)/R(X)),1,5)):PRINTTAB(2+6*X,1
7);Q:T=T+Q
  660         NEXTX
  670       PRINTTAB(14,18)"Grand Total = `";
T
  680       INPUTTAB(0,20)"Press <RETURN> to 
return to menu"X$
  690       GOTO900
  700       MODE7:PRINTCHR$141;CHR$&84;CHR$15
7;CHR$&83"        Holiday expenses          "
CHR$156'CHR$141;CHR$&84;CHR$157;CHR$&83"     
   Holiday expenses          "CHR$156
  710       FORI=2TO23:PRINTTAB(0,I)CHR$&86;:
NEXT
  720       VDU28,2,23,37,3
  730       S$=STRING$(70," ")
  740       PRINT"This program will help you 
to"'"calculate your approximate foreign  exch
ange requirements for a tour"'"through one or
 several countries."
  750       PRINT'"International exchange rat
es are"'"always based on the american dollar 
rate for each currency.For example, the STERL
ING / PESETA rate is"'"produced from the STG/
$ and PTS/$   rates."
  760       PRINT'"The difference between 'bu
ying' and 'selling' prices for currency notes
 or travellers cheques represents thebank's '
profit' on the transaction. A small commissio
n charge is also   often added."
  770       PRINTTAB(0,19)CHR$136;CHR$&81"   
      Press <RETURN>":INPUTX$
  780       CLS:PRINT"Because of the usually 
wide 'spread'between buy and sell quoted for"
'"tourist rates,it is almost always   safer t
o avoid multiple exchange"'"transactions."
  790       PRINT'"Take about 5/10 of small"'
"denomination foreign notes for each country 
you will visit,for use on   arrival.If you ar
e departing from a large airport,these are us
ually"'"available from a bank in the"'"arriva
ls hall."
  800       PRINT'"The following tourist rate
s are"'"included only as a very rough guide.A
ctual market rates will vary,often quite wild
ly,from day to day"
  810       PRINTTAB(0,19)CHR$136;CHR$&81"   
      Press <RETURN>":INPUTX$
  820       FORX=1TO4:READN$(X):NEXT
  830       FORX=1TO4:READR(X):NEXT
  840       FORX=1TO12:READC$(X):NEXT
  850       CLS:PRINT"The program is in three
 sections.        1 Rates entry"'"     2 Cros
s rate calculation"'"     3 Holiday costs"
  860       PRINT'"Four currencies can be han
dled at   the same time.The present four are 
 "CHR$&85,N$(1)","N$(2)","N$(3)","N$(4)'"But 
you may change these by"'"following the promp
ts."
  870       PRINT'"The CAPS LOCK light should
 always   be on during input.If it is not,   
 press CAPS LOCK once."''"Currency codes shou
ld always be"'"three CAPITAL letters."
  880       PRINTTAB(0,19)CHR$136;CHR$&81"   
      Press <RETURN>":INPUTX$
  890       GOTO1060
  900       MODE7:PRINTCHR$141;CHR$&84;CHR$15
7;CHR$&83"        Holiday expenses          "
CHR$156'CHR$141;CHR$&84;CHR$157;CHR$&83"     
   Holiday expenses          "CHR$156:FORI=2T
O23:PRINTTAB(0,I)CHR$&86;:NEXT:VDU28,2,23,37,
3
  910       PRINTCHR$&83"           * * MENU 
* *"
  920       PRINT'"      1 Rates table (View 
only)"
  930       PRINT''"      2 Change rates/curr
encies"
  940       PRINT''"      3 Cross rates calcu
lations"
  950       PRINT''"      4 Holiday costs tab
le"
  960       PRINT''"      5 Change a cost cat
egory"
  970       PRINT''"      6 Calculate total c
osts"
  980       PRINTTAB(4,19)CHR$136;CHR$&81;"Se
lect required option.":X=GET-48
  990       IFX<1 OR X>6 GOTO980
 1000       IFX=1 VF=1:GOTO1060
 1010       IFX=2 GOTO1060
 1020       IFX=3 GOTO50
 1030       IFX=4 GOTO400
 1040       IFX=5 CF=1:GOTO400
 1050       IFX=6 TF=1:GOTO400
 1060       VDU26:FORI=0TO23:PRINTTAB(0,I)CHR
$&86" ";:NEXT:VDU28,2,23,37,0:CLS:PRINTCHR$&8
5"Approximate tourist rates.STG="
 1070       PRINT'"US$ USA dollar",1.52
 1080       PRINT"CN$ CANADA dollar",1.87
 1090       PRINT"FFR FRANCE franc",1.6
 1100       PRINT"BFR BELGIUM franc",76.5
 1110       PRINT"ITL ITALY lire",2265
 1120       PRINT"SFR SWITZERLAND franc     "
;3.22
 1130       PRINT"DMK W.GERMANY D.mark",3.84
 1140       PRINT"ASH AUSTRIA schilling      
";27.0
 1150       PRINT"ESC PORTUGAL escudo",154
 1160       PRINT"SPA SPAIN peseta",211
 1170       PRINT"HFL HOLLAND guilder",4.30
 1180       PRINT"NKR NORWAY krona",11.0
 1190       PRINT"IRP IRELAND punt",1.22
 1200       PRINT"DRA GREECE drachma",128
 1210       PRINT"MLT MALTA pound",0.64
 1220       PRINT"YGD YUGOSLAVIA dinar",127
 1230       PRINT"YEN JAPAN yen",367
 1240       PRINT"AU$ AUSTRALIA dollar",1.74
 1250       PRINT"NZ$ NEW ZEALAND dollar    "
;2.32
 1260       IFVF=1 PRINTTAB(0,22)CHR$136;CHR$
&81"Press <RETURN> to return to menu.":INPUTX
$:VF=0:GOTO900
 1270       FORY=1TO4
 1280         PRINTTAB(0,21)CHR$&83"Currency 
";Y;" is "N$(Y)" Press RETURN"'CHR$&83"to kee
p,or enter new code ";
 1290         INPUTX$:PRINTTAB(0,21)S$
 1300         IFX$="" GOTO1330
 1310         FORX=1TO13:C(X,Y)=0:NEXT
 1320         N$(Y)=LEFT$(X$,3):R(Y)=0
 1330         PRINTTAB(0,21)CHR$&82"Rate for 
"N$(Y)" is ";R(Y);" Press RETURN"'CHR$&82"to 
keep,or enter new rate ";
 1340         INPUTQ$:PRINTTAB(0,21)S$:IFQ$="
" GOTO1370
 1350         IFASC(Q$)<48 OR ASC(Q$)>57 GOTO
1330
 1360         R(Y)=VAL(LEFT$(Q$,4))
 1370         NEXTY
 1380       GOTO900
 1390       DATA FFR,SFR,US$,ITL
 1400       DATA 11.6,3.22,1.52,2265
 1410       DATA HOTEL,TOURS,BUS,MEALS,FOOD,D
RINK,LAUND,FUEL,POST,PHONE,GIFTS,SUNDR