DECLARE SUB removeRedundancies (startIndex!, endIndex!, removalCount!)\r
DECLARE SUB getOperatorPriority (a!, b!)\r
DECLARE SUB movM (x1!, n!)\r
-DECLARE SUB lihts (x1, x2, l)\r
DECLARE SUB clearScreenBuffer ()\r
DECLARE SUB lendm (x1!, m!)\r
DECLARE SUB mov (x1!, n!)\r
17\r
END SUB\r
\r
-SUB lihts (x1, x2, l)\r
- ' Removes redundant parentheses from the logical expression and marks how many were removed\r
- removeRedundancies x1, x2, l1\r
- l = l1\r
- 'BEEP\r
- prnp = prnp + 1\r
- FOR a = x1 TO x2 - l\r
- printText a, 0, 13, 1, CHR$(tehe(a))\r
- NEXT a\r
-END SUB\r
-\r
SUB mov (x1, n)\r
' Moves a portion of the logical expression to the right\r
FOR a = 79 - n TO x1 STEP -1\r
printText a, 0, 13, 1, CHR$(tehe(a))\r
NEXT a\r
\r
-printText 0, 1, 7, 0, "Do you want to simplify it (unfinished so press N)"\r
-a = 0\r
-23\r
-clearScreenBuffer\r
-a$ = INPUT$(1)\r
-IF a$ = "n" OR a$ = "N" THEN GOTO 24\r
-IF a$ = "y" OR a$ = "Y" THEN ELSE GOTO 23\r
-a = 1\r
-24\r
printText 0, 1, 7, 0, SPACE$(79)\r
\r
-l = 0\r
-IF a = 1 THEN lihts 0, ln, l\r
-lahend 0, ln - l\r
+lahend 0, ln\r
\r
a$ = INPUT$(1)\r
\r