A B C D E
1 -------Variables---------
2 "COMPAREA
3 "TOP
4 "BOTTOM
5 "SUBT <-Format this cell as , 2
6 "TOT <-Format this cell as , 2 7 8
-------Procedures---------
9
10 "\I {windowsoff}{paneloff}
11 {GOTO}b50~/rncControlCode~{BS}~
12 {if @cell("type",ControlCode)="b"}{Branch ERR}
13 /dpfci{BS}.{END}{D}~o~g
14 /wdr~~
15 "\S {windowsoff}{Paneloff}
16 "PREP {indicate "One moment please..."}
17 {Goto}ControlCode~{Let Subt,0}{Let Tot,0}
18 {Let COMPAREA,@cellpointer("contents")}
19 {R}{Let TOP,@cellpointer("address")}~{L}
20 "LOOP {D}
21 {If @cellpointer("contents")<>COMPAREA}{DiffCode}
22 {If @cellpointer("type")<>"b"}{Branch LOOP}
23 EOJ {SUBTOT}{TOTAL}
24 {Calc}{Windowson}{panelon}{Indicate}{Quit}
25
26 "DIFFCODE {SUBTOT}{RESET}{RETURN}
27
28 "SUBTOT {U}{R}{Let BOTTOM,@cellpointer("address")}~
29 {Recalc FORM}
30 "FORM +"{Let SUBT,@sum("&TOP&".."&BOTTOM&")}"
31 {let TOT,TOT+SUBT}~
32 {R}/cCOMPAREA~~
33 {R}/rvSUBT~~
34 {L 3}{D}
35 {RETURN}
36
37 "RESET {Let COMPAREA,@cellpointer("contents")}
38 {R}{Let TOP,@cellpointer("address")}~{L}
39 {let SUBT,0}~
40 {return}
41
42 "TOTAL {R 2}**TOTAL**{R}/rvTOT~~
43 {RETURN}
44
45 "ERR Paste or import the text file
46 and press ALT-I again.~
47