1 REMark statmenu (c) Timo Salmi
2 REMark Tue 1989 Mar 07 15:42:55
3 :
100 progs%=7:DIM prog$(progs%,13)
110 p_programs
120 ptr%=1:prev_ptr%=1
130 REPeat perform
140  reset(4)
150  PRINT"  STATistics MENU by Timo Salmi 07.03.89"
160  INK 4:LINE 0,95 TO 168,95
170  FOR i=1 TO progs%:p_show(i),(0):END FOR i
180  p_show(ptr%),(1):p_define
181  INK 4:LINE 0,5 TO 168,5
190  PAPER 0:INK 7:AT 19,2
200  PRINT" and  to choose; space to EXEC_W; CTRL Y to quit"
210  IF NOT f_choice THEN EXIT perform
220 END REPeat perform
230 reset(8)
240 :
2000 DEFine PROCedure p_programs
2010  prog$(1)="fdk1_statprep"
2020  prog$(2)="fdk1_stattran"
2030  prog$(3)="fdk1_statmeas"
2040  prog$(4)="fdk1_statrcor"
2050  prog$(5)="fdk1_statregr"
2060  prog$(6)="fdk1_statdiag"
2070  prog$(7)="fdk1_statauru"
2080 END DEFine p_programs
2090 :
2100 DEFine PROCedure p_define
2110  LOCal col%:col%=25
2120  INK 7:PAPER 0
2130  AT 2,col%:PRINT"(data preparation editor)"
2140  AT 4,col%:PRINT"(transformations on variables)"
2150  AT 6,col%:PRINT"(standard statistical measures)"
2160  AT 8,col%:PRINT"(ranks and correlations)"
2170  AT 10,col%:PRINT"(multiple regression)"
2180  AT 12,col%:PRINT"(scatter diagram)"
2190  AT 14,col%:PRINT"(autocorrelations and runs)"
2200 END DEFine p_define
2210 :
3000 DEFine PROCedure p_show(prog_nro%,rvson%)
3010  IF rvson% THEN 
3020   STRIP 7:INK 0
3030   ELSE :PAPER 0:INK 7:END IF 
3040  AT 2*prog_nro%,2
3050  PRINT prog_nro%;"."!prog$(prog_nro%)
3060 END DEFine p_show
3070 :
4000 DEFine FuNction f_choice
4010  LOCal key,loop
4020  clb%=KEYROW(0):REMark to empty buffer
4030  REPeat loop
4040   key=CODE(INKEY$(-1))
4050   SELect ON key
4060   =208
4070    IF ptr%>1 THEN 
4080     prev_ptr%=ptr%:ptr%=ptr%-1
4090     p_show(prev_ptr%),(0):p_show(ptr%),(1)
4100    END IF 
4110    NEXT loop
4120   =216
4130    IF ptr%<progs% THEN 
4140     prev_ptr%=ptr%:ptr%=ptr%+1
4150     p_show(prev_ptr%),(0):p_show(ptr%),(1)
4160    END IF 
4170    NEXT loop
4180   =32
4190    EXEC_W prog$(ptr%)&"_exe"
4200    RETurn 1
4210   =25,185:RETurn 0
4220   END SELect 
4230  END REPeat loop
4240 END DEFine f_choice
4250 :
31000 DEFine PROCedure reset(i)
31010  LOCal il:MODE i
31020  WINDOW 513,256,0,0:PAPER 0:CLS
31030  OPEN#2,con_:WINDOW#2,448,200,32,16
31040  PAPER#2,1:INK#2,7
31050  WINDOW#0,448,40-(i=4),32,216+(i=4)
31060  WINDOW 448+8*(i=4),200+2*(i=4),32-4*(i=4),16-(i=4)
31070  PAPER 2*(i=8):BORDER (i=4),4*(i=4)
31080  FOR il=0,1,2:CSIZE#il,(i=4)+2*(i=8),0:END FOR il
31090  PAPER#0,0:INK#0,7-3*(i=0):INK 7:CLS
31100  SCALE 100,0,0:FILL 0
31110 END DEFine reset
31120 :
31990 STOP
32000 lisave 1:STOP
32010 lisave 2:STOP
32020 lisave 3:STOP
32030 lisave 4:STOP
32040 DEFine PROCedure lisave(dr)
32050  LOCal a$,b$:a$="statmenu"
32060  b$=DATE$:b$=b$(1 TO 4)
32070  IF b$<>1989 THEN
32080   PRINT#0,DAY$!DATE$!"Not saved, set the date"
32090   BEEP 4000,12:STOP:END IF 
32100  IF dr=1:b$="mdv1_"&a$
32110  IF dr=2:b$="mdv2_"&a$
32120  IF dr=3:b$="fdk1_"&a$
32130  IF dr=4:b$="fdk2_"&a$
32140  DELETE b$:OPEN_NEW#3,b$
32150  PRINT#3,"1 REMark ";a$!"(c) Timo Salmi"
32160  PRINT#3,"2 REMark ";DAY$!DATE$
32170  PRINT#3,"3 :"
32180  LIST#3,100 TO:CLOSE#3:PRINT#0,"Saved"!b$
32190 END DEFine lisave
