Home » Archimedes archive » Acorn User » AU 1993-08.adf » !Bio_Bio » !Bio/Library/VATCalc
!Bio/Library/VATCalc
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1993-08.adf » !Bio_Bio |
Filename: | !Bio/Library/VATCalc |
Read OK: | ✔ |
File size: | 0362 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn User » AU 1993-08.adf » !Bio_Bio » !Bio/Library/VATCalc
- Archimedes archive » Acorn User » AU 1993-09.adf » !Bio_Bio » !Bio/Library/VATCalc
File contents
10REM >VATCalc 20REM LEN Robert Fuller 30REM VAT Calculator 40END 50: 60DEF FNvatcalc_name="Calculate VAT" 70DEF FNvatcalc_args="-in Text -results 2" 80DEF FNvatcalc_init 90=0 100: 110DEF FNvatcalc(in$,RETURN title$,RETURN s1$,RETURN s2$) 120LOCAL in%,s$,exc,inc 130in%=OPENIN(in$) 140WHILE NOT EOF#in% 150PROChourglass(PTR#in%,EXT#in%) 160s$=FNstrip_spaces(GET$#in%) 170IF INSTR("0123456789+-.",LEFT$(s$,1))>0 AND s$<>"" THEN 180exc+=VAL(s$) 190ENDIF 200ENDWHILE 210CLOSE#in% 220exc=(INT(exc*100))/100 230inc=exc*1.175 240inc=(INT(inc*100))/100 250s1$=STR$(exc) 260IF INSTR(s1$,".")=0 s1$+=".00" 270IF ASC(RIGHT$(s1$,2))=46 s1$+="0" 280s2$=STR$(inc) 290IF INSTR(s2$,".")=0 s2$+=".00" 300IF ASC(RIGHT$(s2$,2))=46 s2$+="0" 310title$=FNleaf_name(in$) 320IF LEN(s1$)<LEN(s2$) THEN s1$="Total cost: � "+s1$ ELSE s1$="Total cost: �"+s1$ 330s2$="Including VAT: �"+s2$ 340=0 350: 360DEF FNvatcalc_help(window%,icon%) 370IF window%=-1 THEN ="Drag a text file here to add VAT to the prices contained in it." ELSE =""
� >VATCalc � � Robert Fuller � VAT Calculator (� 2: <#� �vatcalc_name="Calculate VAT" F)� �vatcalc_args="-in Text -results 2" P� �vatcalc_init Z=0 d: n(� �vatcalc(in$,� title$,� s1$,� s2$) x� in%,s$,exc,inc �in%=�(in$) �ȕ � �#in% ��hourglass(�#in%,�#in%) �s$=�strip_spaces(�#in%) �+� �"0123456789+-.",�s$,1))>0 � s$<>"" � �exc+=�(s$) �� �� � �#in% �exc=(�(exc*100))/100 �inc=exc*1.175 �inc=(�(inc*100))/100 �s1$=�(exc) � �s1$,".")=0 s1$+=".00" � �(�s1$,2))=46 s1$+="0" s2$=�(inc) "� �s2$,".")=0 s2$+=".00" ,� �(�s2$,2))=46 s2$+="0" 6title$=�leaf_name(in$) @N� �(s1$)<�(s2$) � s1$="Total cost: � "+s1$ � s1$="Total cost: �"+s1$ Js2$="Including VAT: �"+s2$ T=0 ^: h"� �vatcalc_help(window%,icon%) r[� window%=-1 � ="Drag a text file here to add VAT to the prices contained in it." � ="" �
00000000 0d 00 0a 0e f4 20 3e 56 41 54 43 61 6c 63 0d 00 |..... >VATCalc..| 00000010 14 15 f4 20 a9 20 52 6f 62 65 72 74 20 46 75 6c |... . Robert Ful| 00000020 6c 65 72 0d 00 1e 14 f4 20 56 41 54 20 43 61 6c |ler..... VAT Cal| 00000030 63 75 6c 61 74 6f 72 0d 00 28 05 e0 0d 00 32 05 |culator..(....2.| 00000040 3a 0d 00 3c 23 dd 20 a4 76 61 74 63 61 6c 63 5f |:..<#. .vatcalc_| 00000050 6e 61 6d 65 3d 22 43 61 6c 63 75 6c 61 74 65 20 |name="Calculate | 00000060 56 41 54 22 0d 00 46 29 dd 20 a4 76 61 74 63 61 |VAT"..F). .vatca| 00000070 6c 63 5f 61 72 67 73 3d 22 2d 69 6e 20 54 65 78 |lc_args="-in Tex| 00000080 74 20 2d 72 65 73 75 6c 74 73 20 32 22 0d 00 50 |t -results 2"..P| 00000090 13 dd 20 a4 76 61 74 63 61 6c 63 5f 69 6e 69 74 |.. .vatcalc_init| 000000a0 0d 00 5a 06 3d 30 0d 00 64 05 3a 0d 00 6e 28 dd |..Z.=0..d.:..n(.| 000000b0 20 a4 76 61 74 63 61 6c 63 28 69 6e 24 2c f8 20 | .vatcalc(in$,. | 000000c0 74 69 74 6c 65 24 2c f8 20 73 31 24 2c f8 20 73 |title$,. s1$,. s| 000000d0 32 24 29 0d 00 78 14 ea 20 69 6e 25 2c 73 24 2c |2$)..x.. in%,s$,| 000000e0 65 78 63 2c 69 6e 63 0d 00 82 0e 69 6e 25 3d 8e |exc,inc....in%=.| 000000f0 28 69 6e 24 29 0d 00 8c 0e c8 95 20 ac 20 c5 23 |(in$)...... . .#| 00000100 69 6e 25 0d 00 96 1b f2 68 6f 75 72 67 6c 61 73 |in%.....hourglas| 00000110 73 28 8f 23 69 6e 25 2c a2 23 69 6e 25 29 0d 00 |s(.#in%,.#in%)..| 00000120 a0 1b 73 24 3d a4 73 74 72 69 70 5f 73 70 61 63 |..s$=.strip_spac| 00000130 65 73 28 be 23 69 6e 25 29 0d 00 aa 2b e7 20 a7 |es(.#in%)...+. .| 00000140 22 30 31 32 33 34 35 36 37 38 39 2b 2d 2e 22 2c |"0123456789+-.",| 00000150 c0 73 24 2c 31 29 29 3e 30 20 80 20 73 24 3c 3e |.s$,1))>0 . s$<>| 00000160 22 22 20 8c 0d 00 b4 0e 65 78 63 2b 3d bb 28 73 |"" .....exc+=.(s| 00000170 24 29 0d 00 be 05 cd 0d 00 c8 05 ce 0d 00 d2 09 |$)..............| 00000180 d9 23 69 6e 25 0d 00 dc 18 65 78 63 3d 28 a8 28 |.#in%....exc=(.(| 00000190 65 78 63 2a 31 30 30 29 29 2f 31 30 30 0d 00 e6 |exc*100))/100...| 000001a0 11 69 6e 63 3d 65 78 63 2a 31 2e 31 37 35 0d 00 |.inc=exc*1.175..| 000001b0 f0 18 69 6e 63 3d 28 a8 28 69 6e 63 2a 31 30 30 |..inc=(.(inc*100| 000001c0 29 29 2f 31 30 30 0d 00 fa 0e 73 31 24 3d c3 28 |))/100....s1$=.(| 000001d0 65 78 63 29 0d 01 04 1c e7 20 a7 73 31 24 2c 22 |exc)..... .s1$,"| 000001e0 2e 22 29 3d 30 20 73 31 24 2b 3d 22 2e 30 30 22 |.")=0 s1$+=".00"| 000001f0 0d 01 0e 1c e7 20 97 28 c2 73 31 24 2c 32 29 29 |..... .(.s1$,2))| 00000200 3d 34 36 20 73 31 24 2b 3d 22 30 22 0d 01 18 0e |=46 s1$+="0"....| 00000210 73 32 24 3d c3 28 69 6e 63 29 0d 01 22 1c e7 20 |s2$=.(inc)..".. | 00000220 a7 73 32 24 2c 22 2e 22 29 3d 30 20 73 32 24 2b |.s2$,".")=0 s2$+| 00000230 3d 22 2e 30 30 22 0d 01 2c 1c e7 20 97 28 c2 73 |=".00"..,.. .(.s| 00000240 32 24 2c 32 29 29 3d 34 36 20 73 32 24 2b 3d 22 |2$,2))=46 s2$+="| 00000250 30 22 0d 01 36 1a 74 69 74 6c 65 24 3d a4 6c 65 |0"..6.title$=.le| 00000260 61 66 5f 6e 61 6d 65 28 69 6e 24 29 0d 01 40 4e |af_name(in$)..@N| 00000270 e7 20 a9 28 73 31 24 29 3c a9 28 73 32 24 29 20 |. .(s1$)<.(s2$) | 00000280 8c 20 73 31 24 3d 22 54 6f 74 61 6c 20 63 6f 73 |. s1$="Total cos| 00000290 74 3a 20 20 20 20 a3 20 22 2b 73 31 24 20 8b 20 |t: . "+s1$ . | 000002a0 73 31 24 3d 22 54 6f 74 61 6c 20 63 6f 73 74 3a |s1$="Total cost:| 000002b0 20 20 20 20 a3 22 2b 73 31 24 0d 01 4a 1e 73 32 | ."+s1$..J.s2| 000002c0 24 3d 22 49 6e 63 6c 75 64 69 6e 67 20 56 41 54 |$="Including VAT| 000002d0 3a 20 a3 22 2b 73 32 24 0d 01 54 06 3d 30 0d 01 |: ."+s2$..T.=0..| 000002e0 5e 05 3a 0d 01 68 22 dd 20 a4 76 61 74 63 61 6c |^.:..h". .vatcal| 000002f0 63 5f 68 65 6c 70 28 77 69 6e 64 6f 77 25 2c 69 |c_help(window%,i| 00000300 63 6f 6e 25 29 0d 01 72 5b e7 20 77 69 6e 64 6f |con%)..r[. windo| 00000310 77 25 3d 2d 31 20 8c 20 3d 22 44 72 61 67 20 61 |w%=-1 . ="Drag a| 00000320 20 74 65 78 74 20 66 69 6c 65 20 68 65 72 65 20 | text file here | 00000330 74 6f 20 61 64 64 20 56 41 54 20 74 6f 20 74 68 |to add VAT to th| 00000340 65 20 70 72 69 63 65 73 20 63 6f 6e 74 61 69 6e |e prices contain| 00000350 65 64 20 69 6e 20 69 74 2e 22 20 8b 20 3d 22 22 |ed in it." . =""| 00000360 0d ff |..| 00000362