home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / grp / timers.ba < prev    next >
Text File  |  2006-10-19  |  4KB  |  56 lines

  1. 0 'TIMER.BA AUTHOR UNKNOWN
  2. 1 'CLUB 100 LIBRARY - 415/939-1246 BBS,    937-5039 NEWSLETTER, 932-8856 VOICE
  3. 10 ' Each time a timer is started,
  4. 20 ' the clock loses .5 second, on
  5. 30 ' average, due to line 220.  This
  6. 40 ' makes the timers more accurate
  7. 50 ' but sacrifices clock accuracy.
  8. 60 ' W Hubbard  70346,1716 4/28/85
  9. 70 PRINTCHR$(27)"U";:CLS:KEYON:ONKEYGOSUB450,290,480,,,,,140:DT$="00:00:00
  10. 80 PRINT:PRINT"Timer Options:":PRINT"  1  Clock":PRINT"  2  Count-Up Timer":PRINT"  3  Count-Down Timer":PRINT"  8  Menu":PRINT"Press Function Key 1 2 or 3";
  11. 90 PRINT@31,TIME$;:A$=INKEY$:GOTO90
  12. 100 ST=0:LL=0:P=0:IFX=-1THEN480ELSE290
  13. 110 LL=ABS(LL-1):P=0:IFLLTHENPRINT@7,CHR$(27)"p 5-Lap "CHR$(27)"q";:RETURNELSEPRINT@7," 5-Lap ";:GOTO370
  14. 120 ST=ABS(ST-1):IFSTTHENPRINT@13,CHR$(27)"p 6-Stop/Start "CHR$(27)"q";:RETURNELSEPRINT@13," 6-Stop/Start ";:RETURN
  15. 130 KEYON:CLS:P=0:LL=0:ST=0:PRINT@172,"+":PRINT@185,"+":PRINT@292,"+";:PRINT@305,"+";:N$=STRING$(6,8)+CHR$(10):ONKEYGOSUB450,290,480,100,110,120,,150:RETURN
  16. 140 MENU
  17. 150 RUN
  18. 160 PRINT@L," ⁿ∩∩∩■"N$" ∩√ ²∩"N$" ∩   ∩"N$" ∩   ∩"N$;:PRINT" ∩   ∩"N$" ∩■ ⁿ∩"N$" ²∩∩∩√";:RETURN
  19. 170 PRINT@L,"  ⁿ∩Θ "N$"  τ∩Θ "N$"   ∩Θ "N$"   ∩Θ "N$;:PRINT"   ∩Θ "N$"   ∩Θ "N$" ∩∩∩∩∩";:RETURN
  20. 180 PRINT@L," ⁿ∩∩∩■"N$" ∩√ ²∩"N$" τ  ⁿ∩"N$"   ⁿ∩√"N$;:PRINT"  ⁿ∩√ "N$" ⁿ∩√ Φ"N$" ∩∩∩∩∩";:RETURN
  21. 190 PRINT@L," ∩∩∩∩∩"N$"    ⁿ∩"N$"   ⁿ∩√"N$"   ∩∩■"N$;:PRINT"    ²∩"N$" ∩■ ⁿ∩"N$" ²∩∩∩√";:RETURN
  22. 200 PRINT@L,"    ∩Θ"N$" ∩Θ ∩Θ"N$" ∩φΦ∩φ"N$" ∩∩∩∩∩"N$;:PRINT"    ∩Θ"N$"    ∩Θ"N$"    ∩Θ";:RETURN
  23. 210 PRINT@L," ∩∩∩∩∩"N$" ∩δτττ"N$" ∩Θ   "N$" ∩∩∩∩■"N$;:PRINT"    ²∩"N$" ∩■ ⁿ∩"N$" ²∩∩∩√";:RETURN
  24. 220 PRINT@L," ⁿ∩∩∩■"N$" ∩√ ²√"N$" ∩    "N$" ∩ⁿ∩∩■"N$;:PRINT" ∩√ ²∩"N$" ∩■ ⁿ∩"N$" ²∩∩∩√";:RETURN
  25. 230 PRINT@L," ∩∩∩∩∩"N$" τττ∞∩"N$"    ε∩"N$"   ⁿ∩√"N$;:PRINT"  ⁿ∩√ "N$" ⁿ∩√  "N$" ∩√   ";:RETURN
  26. 240 PRINT@L," ⁿ∩∩∩■"N$" ∩√ ²∩"N$" ∩■ ⁿ∩"N$" Ω∩∩∩Θ"N$;:PRINT" ∩√ ²∩"N$" ∩■ ⁿ∩"N$" ²∩∩∩√";:RETURN
  27. 250 PRINT@L," ⁿ∩∩∩■"N$" ∩√ ²∩"N$" ∩■ ⁿ∩"N$" ²∩∩√∩"N$;:PRINT"     ∩"N$"     ∩"N$"     ∩";:RETURN
  28. 260 PRINT@1,"Press ENTER to begin timing.
  29. 270 A$=INKEY$:IFA$=""THEN270ELSETI$=TIME$
  30. 280 TIME$=TIME$:PRINT@1,CHR$(27)"K":TS=0:PRINT@0,"4-Reset 5-Lap 6-Stop/Start";:RETURN
  31. 290 GOSUB130:T$="00:00:00":Y$="0":Z$=Y$::X=1:Y=60:Z=0:GOSUB370:GOSUB260
  32. 300 IFTI$=TIME$THENPRINT@31,TI$;:IFX=-1ANDT$="00:00:00"THENMOTORON:PRINTCHR$(7);:FORA=1TO100:PRINT@31,TIME$;:NEXT:MOTOROFF:GOTO90ELSE300ELSETI$=TIME$:IFSTTHEN300
  33. 310 TS=TS+X:IFTS=YTHENTS=Z:TM=TM+X:IFTM=YTHENTM=Z:TH=TH+X:IFX=1THENIFTH=100THENTH=0ELSETH=THELSEIFTH=-1THEN90
  34. 320 TS$=MID$(STR$(TS),2):IFLEN(TS$)=1THENTS$="0"+TS$
  35. 330 TM$=MID$(STR$(TM),2):IFLEN(TM$)=1THENTM$="0"+TM$
  36. 340 TH$=MID$(STR$(TH),2):IFLEN(TH$)=1THENTH$="0"+TH$
  37. 350 T$=TH$+":"+TM$+":"+TS$:IFLL=0THENGOSUB370
  38. 360 GOTO300
  39. 370 L=72:N=8:GOSUB440:IFX$<>Y$ANDPTHEN430
  40. 380 L=66:N=7:GOSUB440:IFX$<>Z$ANDPTHEN430
  41. 390 L=59:N=5:GOSUB440:IFX$<>Y$ANDPTHEN430
  42. 400 L=53:N=4:GOSUB440:IFX$<>Z$ANDPTHEN430
  43. 410 L=46:N=2:GOSUB440:IFX$<>Y$ANDPTHEN430
  44. 420 L=40:N=1:GOSUB440:P=1
  45. 430 RETURN
  46. 440 X$=MID$(T$,N,1):ONASC(X$)-47GOTO160,170,180,190,200,210,220,230,240,250
  47. 450 CLS:GOSUB130:Y$="0":Z$="0":X=1:Y=60:Z=0
  48. 460 IFT$=TIME$THEN460ELSET$=TIME$:TI=VAL(LEFT$(T$,2)):IFTI>12THENTI=TI-12:T$=RIGHT$("0"+MID$(STR$(TI),2)+RIGHT$(T$,6),8)
  49. 470 GOSUB370:GOTO460
  50. 480 CLS:GOSUB130:CLS:GOSUB500:GOSUB130:Y$="9":Z$="5":X=-1:Y=-1:Z=59:GOSUB370:GOSUB260:TS=VAL(MID$(T$,7)):TM=VAL(MID$(T$,4,2)):TH=VAL(MID$(T$,1,2)):IFTS=0ANDTM=0ANDTH=0THENCLS:PRINT@0,"Can't count down from 0"CHR$(7);:GOTO80
  51. 490 GOTO300
  52. 500 PRINT@102,DT$:KEYON:PRINT@80,"Enter the ";:LINEINPUT"start time: ";T$:IFT$=""THENT$=DT$
  53. 510 IFLEN(T$)<8THENT$="0"+T$:GOTO510
  54. 520 FORN=1TO8:IFMID$(T$,N,1)<"0"ORMID$(T$,N,1)>"9"THENMID$(T$,N,1)="0":NEXTELSENEXT
  55. 530 MID$(T$,3,1)=":":MID$(T$,6,1)=":":DT$=T$:RETURN
  56.