-DECLARE FUNCTION getnam$ (a%)\r
-DECLARE FUNCTION getsym$ (a$, b%)\r
+DECLARE FUNCTION getName$ (a%)\r
+DECLARE FUNCTION getSym$ (a$, b%)\r
DECLARE SUB editor ()\r
DECLARE SUB leiaconf ()\r
DECLARE SUB clrerr ()\r
DECLARE SUB kola (a%)\r
DECLARE SUB rese ()\r
DECLARE SUB start ()\r
-DECLARE SUB getnad (g%, n%, d%, k%)\r
+DECLARE SUB getNad (g%, n%, d%, k%)\r
DECLARE SUB initp (b$)\r
-DECLARE SUB getmd (a$, m%, d%)\r
+DECLARE SUB getMd (a$, m%, d%)\r
DECLARE SUB son (a$)\r
DECLARE SUB inita ()\r
DECLARE SUB chm ()\r
n2 = VAL(LEFT$(a$, 2))\r
a$ = LEFT$(a$, 5)\r
n3 = VAL(RIGHT$(a$, 2))\r
-getnad n1, n2, n3, ndlp\r
+getNad n1, n2, n3, ndlp\r
FOR a = 1 TO apl\r
-son ap$(a)\r
-SELECT CASE sona$(1)\r
-CASE "v"\r
-getmd sona$(2), m1, d1\r
-getmd sona$(3), m2, d2\r
-getmd DATE$, m3, d3\r
-IF m3 < m1 THEN GOTO 9\r
-IF m3 > m2 THEN GOTO 9\r
-IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
-IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
-b$ = sona$(4)\r
-CASE "n"\r
-getmd sona$(2), m1, d1\r
-getmd sona$(3), m2, d2\r
-getmd DATE$, m3, d3\r
-IF m3 < m1 THEN GOTO 9\r
-IF m3 > m2 THEN GOTO 9\r
-IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
-IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
-IF ndlp <> VAL(sona$(4)) THEN GOTO 9\r
-b$ = sona$(5)\r
-CASE "e"\r
-getmd sona$(2), m1, d1\r
-getmd DATE$, m2, d2\r
-IF (m1 = m2) AND (d1 = d2) THEN b$ = sona$(3)\r
-END SELECT\r
+ son ap$(a)\r
+ SELECT CASE sona$(1)\r
+ CASE "v"\r
+ getMd sona$(2), m1, d1\r
+ getMd sona$(3), m2, d2\r
+ getMd DATE$, m3, d3\r
+ IF m3 < m1 THEN GOTO 9\r
+ IF m3 > m2 THEN GOTO 9\r
+ IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+ IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+ b$ = sona$(4)\r
+ CASE "n"\r
+ getMd sona$(2), m1, d1\r
+ getMd sona$(3), m2, d2\r
+ getMd DATE$, m3, d3\r
+ IF m3 < m1 THEN GOTO 9\r
+ IF m3 > m2 THEN GOTO 9\r
+ IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+ IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+ IF ndlp <> VAL(sona$(4)) THEN GOTO 9\r
+ b$ = sona$(5)\r
+ CASE "e"\r
+ getMd sona$(2), m1, d1\r
+ getMd DATE$, m2, d2\r
+ IF (m1 = m2) AND (d1 = d2) THEN b$ = sona$(3)\r
+ END SELECT\r
9\r
NEXT a\r
\r
dato$ = a$\r
b = 0\r
FOR a = 1 TO ppl\r
-son pp$(a)\r
-SELECT CASE sona$(1)\r
-CASE "#"\r
-getmd sona$(2), h1, m1\r
-getmd TIME$, h2, m2\r
-' PRINT h1, m1, h2, m2\r
-IF (h2 = h1) AND (m2 = m1) THEN\r
-IF sona$(3) = "sis" THEN b = 1\r
-IF sona$(3) = "val" THEN b = 2\r
-END IF\r
-END SELECT\r
-NEXT a\r
+ son pp$(a)\r
+ SELECT CASE sona$(1)\r
+ CASE "#"\r
+ getMd sona$(2), h1, m1\r
+ getMd TIME$, h2, m2\r
+ ' PRINT h1, m1, h2, m2\r
+ IF (h2 = h1) AND (m2 = m1) THEN\r
+ IF sona$(3) = "sis" THEN b = 1\r
+ IF sona$(3) = "val" THEN b = 2\r
+ END IF\r
+ END SELECT\r
+ NEXT a\r
\r
IF (tunnidara = 0) AND (b > 0) THEN kell b\r
ssave = ssave + 1\r
LOCATE 12, 15\r
PRINT "Kuu-P�ev-Aasta (USA standard)"\r
\r
-\r
LOCATE 17\r
\r
FOR a = 1 TO ppl\r
-IF pp$(a) <> SPACE$(LEN(pp$(a))) THEN\r
- PRINT pp$(a);\r
- PRINT SPACE$(15 - LEN(pp$(a)));\r
-END IF\r
+ IF pp$(a) <> SPACE$(LEN(pp$(a))) THEN\r
+ PRINT pp$(a);\r
+ PRINT SPACE$(15 - LEN(pp$(a)));\r
+ END IF\r
NEXT a\r
\r
displukk\r
SUB displukk\r
LOCATE 1, 40\r
IF kblukk = 1 THEN\r
- COLOR 0, 7\r
- PRINT "Klaviatuur lukus! Vajuta CTRL+L"\r
- COLOR 15, 0\r
+ COLOR 0, 7\r
+ PRINT "Klaviatuur lukus! Vajuta CTRL+L"\r
+ COLOR 15, 0\r
ELSE\r
- PRINT " "\r
+ PRINT " "\r
END IF\r
END SUB\r
\r
LOCATE 16, 20\r
COLOR 12 + 15, 0\r
IF tunnidara = 1 THEN\r
- PRINT "T2na on k6ik tunnid 2ra j2etud"\r
+ PRINT "T2na on k6ik tunnid 2ra j2etud"\r
ELSE\r
- PRINT " "\r
+ PRINT " "\r
END IF\r
COLOR 15, 0\r
END SUB\r
LOCATE 1, 1\r
PRINT SPACE$(80);\r
LOCATE 1, 1\r
-PRINT "Konfiguratsiooni redaktor. Valige v2lja p2eva v6i aasta plaani."\r
+PRINT "Konfiguratsiooni redaktor. Valige v�lja p�eva v6i aasta plaani."\r
LOCATE 2, 1\r
-PRINT SPACE$(80);\r
+PRINT SPACE$(80)\r
LOCATE 2, 1\r
PRINT " nr nimi laiend suurus loomisdaatum"\r
\r
LOCATE 22, 1\r
-PRINT SPACE$(80);\r
+PRINT SPACE$(80)\r
LOCATE 22, 1\r
-PRINT "K - valitud faili kustutamine U - uus fail ESC - redaktorist v2lja"\r
+PRINT "K - valitud faili kustutamine U - uus fail ESC - redaktorist v�lja"\r
p = 0\r
v = 1\r
17\r
FOR a = 3 TO 21\r
- IF a - 2 + p = v THEN\r
- COLOR 0, 7\r
- LOCATE a, 1\r
- PRINT cnflist$(a - 2 + p) + SPACE$(55 - LEN(cnflist$(a - 2 + p)))\r
- LOCATE a, 56\r
- COLOR 31, 0\r
- PRINT "<==";\r
- IF cnflist$(a - 2 + p) <> SPACE$(LEN(cnflist$(a - 2 + p))) THEN\r
- COLOR 15, 0\r
- PRINT " valitud: " + getnam$(v)\r
+ IF a - 2 + p = v THEN\r
+ COLOR 0, 7\r
+ LOCATE a, 1\r
+ PRINT cnflist$(a - 2 + p) + SPACE$(55 - LEN(cnflist$(a - 2 + p)))\r
+ LOCATE a, 56\r
+ COLOR 31, 0\r
+ PRINT "<=="\r
+ IF cnflist$(a - 2 + p) <> SPACE$(LEN(cnflist$(a - 2 + p))) THEN\r
+ COLOR 15, 0\r
+ PRINT " valitud: " + getName$(v)\r
+ END IF\r
+ COLOR 15, 0\r
+ ELSE\r
+ COLOR 15, 0\r
+ LOCATE a, 1\r
+ PRINT cnflist$(a - 2 + p) + SPACE$(80 - LEN(cnflist$(a - 2 + p)))\r
END IF\r
- COLOR 15, 0\r
- ELSE\r
- COLOR 15, 0\r
- LOCATE a, 1\r
- PRINT cnflist$(a - 2 + p) + SPACE$(80 - LEN(cnflist$(a - 2 + p)))\r
- END IF\r
NEXT a\r
- \r
\r
a$ = INKEY$\r
LOCATE 1, 1\r
IF a$ = CHR$(0) + CHR$(73) THEN v = v - 17\r
IF a$ = CHR$(0) + CHR$(81) THEN v = v + 17\r
IF a$ = "K" OR a$ = "k" THEN\r
- IF LEN(getnam$(v)) > 2 THEN\r
- IF getnam$(v) = "AASTA.AP" THEN\r
- SOUND 3000, .1\r
+ IF LEN(getName$(v)) > 2 THEN\r
+ IF getName$(v) = "AASTA.AP" THEN\r
+ SOUND 3000, .1\r
+ ELSE\r
+ KILL getName$(v)\r
+ GOTO 23\r
+ END IF\r
ELSE\r
- KILL getnam$(v)\r
- GOTO 23\r
+ SOUND 3000, .1\r
END IF\r
- ELSE\r
- SOUND 3000, .1\r
- END IF\r
END IF\r
IF a$ = CHR$(13) THEN\r
- IF getnam$(v) = "." THEN\r
- SOUND 3000, .1\r
- ELSE\r
- SHELL "EDIT " + getnam$(v)\r
- GOTO 23\r
- END IF\r
+ IF getName$(v) = "." THEN\r
+ SOUND 3000, .1\r
+ ELSE\r
+ SHELL "EDIT " + getName$(v)\r
+ GOTO 23\r
+ END IF\r
END IF\r
\r
IF v < 1 THEN v = 1: SOUND 3000, .2\r
IF v > 200 THEN v = 200: : SOUND 3000, .2\r
\r
-21 IF v - p > 19 THEN p = p + 1: GOTO 21\r
-22 IF v - p < 1 THEN p = p - 1: GOTO 22\r
+21\r
+IF v - p > 19 THEN p = p + 1: GOTO 21\r
+22\r
+IF v - p < 1 THEN p = p - 1: GOTO 22\r
\r
GOTO 17\r
18\r
disp\r
END SUB\r
\r
-SUB getmd (a$, m, d)\r
+SUB getMd (a$, m, d)\r
b$ = LEFT$(a$, 5)\r
m = VAL(LEFT$(b$, 2))\r
d = VAL(RIGHT$(b$, 2))\r
\r
END SUB\r
\r
-SUB getnad (g, n, d, k)\r
+SUB getNad (g, n, d, k)\r
'LOCATE 11, 1\r
'PRINT g, n, d\r
p = g\r
IF k = 0 THEN k = 7\r
END SUB\r
\r
-FUNCTION getnam$ (a)\r
+FUNCTION getName$ (a)\r
c$ = ""\r
FOR b = 8 TO 40\r
- d$ = getsym(cnflist$(a), b)\r
- IF d$ = " " THEN GOTO 19\r
- c$ = c$ + d$\r
+ d$ = getSym(cnflist$(a), b)\r
+ IF d$ = " " THEN GOTO 19\r
+ c$ = c$ + d$\r
NEXT b\r
19\r
-getnam$ = c$ + "." + getsym(cnflist$(a), 17) + getsym(cnflist$(a), 18)\r
+getName$ = c$ + "." + getSym(cnflist$(a), 17) + getSym(cnflist$(a), 18)\r
END FUNCTION\r
\r
-FUNCTION getsym$ (a$, b)\r
-getsym$ = RIGHT$(LEFT$(a$, b), 1)\r
+FUNCTION getSym$ (a$, b)\r
+getSym$ = RIGHT$(LEFT$(a$, b), 1)\r
END FUNCTION\r
\r
SUB heli (a)\r
'GOTO 10\r
SELECT CASE a\r
-CASE 1\r
-FOR c = 1 TO 5\r
-SOUND 3000, 1\r
-SOUND 0, 1\r
-NEXT c\r
-\r
-CASE 2\r
-FOR c = 1 TO 5\r
-SOUND 2500, 1\r
-SOUND 0, 2\r
-NEXT c\r
-SOUND 2500, 10\r
-\r
-CASE 3\r
-FOR a = 1 TO 10\r
-SOUND 500, .5\r
-SOUND 1500, .5\r
-SOUND 2000, .5\r
-SOUND 1520, .5\r
-NEXT a\r
-\r
-\r
-CASE 4\r
-FOR a = 800 TO 1000 STEP 10\r
-SOUND a, .1\r
-SOUND a * 3, .1\r
-SOUND 0, 1\r
-NEXT a\r
-10\r
-\r
+ CASE 1\r
+ FOR c = 1 TO 5\r
+ SOUND 3000, 1\r
+ SOUND 0, 1\r
+ NEXT c\r
+\r
+ CASE 2\r
+ FOR c = 1 TO 5\r
+ SOUND 2500, 1\r
+ SOUND 0, 2\r
+ NEXT c\r
+ SOUND 2500, 10\r
+\r
+ CASE 3\r
+ FOR a = 1 TO 10\r
+ SOUND 500, .5\r
+ SOUND 1500, .5\r
+ SOUND 2000, .5\r
+ SOUND 1520, .5\r
+ NEXT a\r
+\r
+ CASE 4\r
+ FOR a = 800 TO 1000 STEP 10\r
+ SOUND a, .1\r
+ SOUND a * 3, .1\r
+ SOUND 0, 1\r
+ NEXT a\r
+ 10\r
END SELECT\r
\r
-\r
END SUB\r
\r
SUB inita\r
\r
SUB initp (b$)\r
ppl = 0\r
-errmsg$ = "Ei leia aastaplaanis mainitud '" + b$ + ".pp' p2evaplaani!"\r
+errmsg$ = "Ei leia aastaplaanis mainitud '" + b$ + ".pp' p�evaplaani!"\r
OPEN b$ + ".pp" FOR INPUT AS #1\r
clrerr\r
6\r
heli 3\r
\r
SELECT CASE a\r
-CASE 1\r
-kola 4\r
-FOR b = 1 TO 15\r
-SOUND 0, 1\r
-NEXT b\r
-kola 1\r
-CASE 2\r
-kola 5\r
+ CASE 1\r
+ kola 4\r
+ FOR b = 1 TO 15\r
+ SOUND 0, 1\r
+ NEXT b\r
+ kola 1\r
+\r
+ CASE 2\r
+ kola 5\r
END SELECT\r
2\r
+\r
END SUB\r
\r
SUB kola (a)\r
COLOR 15, 7\r
s$ = ""\r
FOR b = 1 TO 80\r
- s$ = s$ + CHR$(219)\r
+ s$ = s$ + CHR$(219)\r
NEXT b\r
FOR b = 1 TO 30\r
-PRINT s$;\r
+ PRINT s$;\r
NEXT b\r
\r
timero = TIMER\r
\r
SUB leiaconf\r
FOR a = 1 TO 200\r
- cnflist$(a) = ""\r
+ cnflist$(a) = ""\r
NEXT a\r
c = 1\r
\r
IF LEFT$(a$, 1) = " " THEN GOTO 15\r
IF LEFT$(a$, 1) = "." THEN GOTO 15\r
b$ = RIGHT$(LEFT$(a$, 12), 3)\r
-IF b$ = "PP " OR b$ = "AP " THEN ELSE GOTO 15\r
+IF b$ = "PP " OR b$ = "AP " THEN ELSE GOTO 15\r
d$ = " " + STR$(c)\r
a$ = RIGHT$(d$, 4) + " " + a$\r
IF LEN(a$) > 50 THEN a$ = LEFT$(a$, 50)\r
a$ = INKEY$\r
\r
IF a$ <> "" THEN\r
-IF ssave > ssavel THEN disp\r
-ssave = 0\r
+ IF ssave > ssavel THEN disp\r
+ ssave = 0\r
END IF\r
\r
IF a$ = CHR$(12) THEN\r
- IF kblukk = 1 THEN kblukk = 0 ELSE kblukk = 1\r
- displukk\r
+ IF kblukk = 1 THEN kblukk = 0 ELSE kblukk = 1\r
+ displukk\r
END IF\r
IF kblukk = 1 THEN\r
- IF a$ <> "" THEN SOUND 3000, 1\r
- a$ = ""\r
+ IF a$ <> "" THEN SOUND 3000, 1\r
+ a$ = ""\r
END IF\r
IF a$ = "k" OR a$ = "K" THEN editor\r
\r
IF a$ = "v" OR a$ = "V" THEN kell 2\r
\r
IF a$ = "a" THEN\r
-CLS\r
-PRINT " vana aeg: " + TIME$\r
-INPUT "sisesta uus aeg (TT:MM:SS): ", b$\r
-IF LEN(b$) <> 8 THEN GOTO 12\r
-TIME$ = b$\r
-timo$ = ""\r
-12\r
-disp\r
+ CLS\r
+ PRINT " vana aeg: " + TIME$\r
+ INPUT "sisesta uus aeg (TT:MM:SS): ", b$\r
+ IF LEN(b$) <> 8 THEN GOTO 12\r
+ TIME$ = b$\r
+ timo$ = ""\r
+ 12\r
+ disp\r
END IF\r
\r
IF a$ = "d" OR a$ = "D" THEN\r
-CLS\r
-PRINT " vana daatum: " + DATE$\r
-INPUT "sisesta uus daatum (KK-PP-AAAA): ", b$\r
-IF LEN(b$) <> 10 THEN GOTO 13\r
-DATE$ = b$\r
-timo$ = ""\r
-13\r
-disp\r
+ CLS\r
+ PRINT " vana daatum: " + DATE$\r
+ INPUT "sisesta uus daatum (KK-PP-AAAA): ", b$\r
+ IF LEN(b$) <> 10 THEN GOTO 13\r
+ DATE$ = b$\r
+ timo$ = ""\r
+ 13\r
+ disp\r
END IF\r
\r
IF a$ = "7" OR a$ = "8" THEN\r
- b = VAL(RIGHT$(LEFT$(TIME$, 5), 2))\r
- IF a$ = "7" THEN b = b - 1\r
- IF a$ = "8" THEN b = b + 1\r
- IF b < 0 THEN b = 0\r
- IF b > 59 THEN b = 59\r
- d$ = STR$(b)\r
- IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
- IF LEN(d$) < 2 THEN d$ = "0" + d$\r
- e$ = LEFT$(TIME$, 3) + d$ + RIGHT$(TIME$, 3)\r
- TIME$ = e$\r
+ b = VAL(RIGHT$(LEFT$(TIME$, 5), 2))\r
+ IF a$ = "7" THEN b = b - 1\r
+ IF a$ = "8" THEN b = b + 1\r
+ IF b < 0 THEN b = 0\r
+ IF b > 59 THEN b = 59\r
+ d$ = STR$(b)\r
+ IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+ IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+ e$ = LEFT$(TIME$, 3) + d$ + RIGHT$(TIME$, 3)\r
+ TIME$ = e$\r
END IF\r
\r
IF a$ = "4" OR a$ = "5" THEN\r
- b = VAL(LEFT$(TIME$, 2))\r
- IF a$ = "4" THEN b = b - 1\r
- IF a$ = "5" THEN b = b + 1\r
- IF b < 0 THEN b = 0\r
- IF b > 23 THEN b = 23\r
- d$ = STR$(b)\r
- IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
- IF LEN(d$) < 2 THEN d$ = "0" + d$\r
- e$ = d$ + RIGHT$(TIME$, 6)\r
- TIME$ = e$\r
+ b = VAL(LEFT$(TIME$, 2))\r
+ IF a$ = "4" THEN b = b - 1\r
+ IF a$ = "5" THEN b = b + 1\r
+ IF b < 0 THEN b = 0\r
+ IF b > 23 THEN b = 23\r
+ d$ = STR$(b)\r
+ IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+ IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+ e$ = d$ + RIGHT$(TIME$, 6)\r
+ TIME$ = e$\r
END IF\r
\r
IF a$ = "p" OR a$ = "P" THEN SHELL "EDIT juhend.txt": disp\r
IF a$ = "q" OR a$ = "Q" THEN SYSTEM\r
\r
IF a$ = "j" OR a$ = "J" THEN\r
-IF tunnidara = 0 THEN tunnidara = 1 ELSE tunnidara = 0\r
-dispt\r
+ IF tunnidara = 0 THEN tunnidara = 1 ELSE tunnidara = 0\r
+ dispt\r
END IF\r
\r
IF ssave <= ssavel THEN\r
- LOCATE 11, 1\r
- PRINT TIME$\r
- LOCATE 12, 1\r
- PRINT DATE$\r
+ LOCATE 11, 1\r
+ PRINT TIME$\r
+ LOCATE 12, 1\r
+ PRINT DATE$\r
ELSE\r
- IF ABS(TIMER - timero) > 10 THEN\r
- CLS\r
- kblukk = 1\r
- FOR b = 1 TO 20\r
- LOCATE RND * 22 + 1, RND * 79 + 1\r
- IF RND * 100 < 50 THEN PRINT "*" ELSE PRINT "."\r
- NEXT b\r
- LOCATE RND * 22 + 1, RND * 50 + 1\r
- COLOR 0, 7\r
- PRINT "< " + LEFT$(TIME$, 2);\r
- COLOR 16, 7\r
- PRINT ":";\r
- COLOR 0, 7\r
- PRINT RIGHT$(LEFT$(TIME$, 5), 2) + " >"\r
- COLOR 15, 0\r
- timero = TIMER\r
- END IF\r
+ IF ABS(TIMER - timero) > 10 THEN\r
+ CLS\r
+ kblukk = 1\r
+ FOR b = 1 TO 20\r
+ LOCATE RND * 22 + 1, RND * 79 + 1\r
+ IF RND * 100 < 50 THEN PRINT "*" ELSE PRINT "."\r
+ NEXT b\r
+ LOCATE RND * 22 + 1, RND * 50 + 1\r
+ COLOR 0, 7\r
+ PRINT "< " + LEFT$(TIME$, 2);\r
+ COLOR 16, 7\r
+ PRINT ":";\r
+ COLOR 0, 7\r
+ PRINT RIGHT$(LEFT$(TIME$, 5), 2) + " >"\r
+ COLOR 15, 0\r
+ timero = TIMER\r
+ END IF\r
END IF\r
GOTO 1\r
\r
-\r
END SUB\r
\r
SUB rese\r
SUB son (a$)\r
\r
FOR b = 1 TO 50\r
- sona$(b) = ""\r
+ sona$(b) = ""\r
NEXT b\r
mitus = 0\r
\r
b = 1\r
FOR c = 1 TO LEN(a$)\r
-d$ = RIGHT$(LEFT$(a$, c), 1)\r
-IF d$ = " " OR d$ = CHR$(9) THEN\r
-b = 1\r
-ELSE\r
-IF b = 1 THEN b = 0: mitus = mitus + 1\r
-sona$(mitus) = sona$(mitus) + d$\r
-END IF\r
+ d$ = RIGHT$(LEFT$(a$, c), 1)\r
+ IF d$ = " " OR d$ = CHR$(9) THEN\r
+ b = 1\r
+ ELSE\r
+ IF b = 1 THEN b = 0: mitus = mitus + 1\r
+ sona$(mitus) = sona$(mitus) + d$\r
+ END IF\r
NEXT c\r
\r
-\r
END SUB\r
\r
SUB start\r
\r
OUT prt, 0\r
END SUB\r
-\r