From 7c58b90c56a43d6a3d3a7996c110e638eb453578 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Sun, 23 Feb 2025 14:12:09 +0200 Subject: [PATCH] Improve code readability --- Math/Truth table calculator/truth.bas | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/Math/Truth table calculator/truth.bas b/Math/Truth table calculator/truth.bas index d40db74..9d417f2 100755 --- a/Math/Truth table calculator/truth.bas +++ b/Math/Truth table calculator/truth.bas @@ -26,7 +26,6 @@ DECLARE SUB removeRedundancies (startIndex!, endIndex!, removalCount!) DECLARE SUB getOperatorPriority (a!, b!) DECLARE SUB movM (x1!, n!) -DECLARE SUB lihts (x1, x2, l) DECLARE SUB clearScreenBuffer () DECLARE SUB lendm (x1!, m!) DECLARE SUB mov (x1!, n!) @@ -176,17 +175,6 @@ m = c - x1 + 1 17 END SUB -SUB lihts (x1, x2, l) - ' Removes redundant parentheses from the logical expression and marks how many were removed - removeRedundancies x1, x2, l1 - l = l1 - 'BEEP - prnp = prnp + 1 - FOR a = x1 TO x2 - l - printText a, 0, 13, 1, CHR$(tehe(a)) - NEXT a -END SUB - SUB mov (x1, n) ' Moves a portion of the logical expression to the right FOR a = 79 - n TO x1 STEP -1 @@ -227,20 +215,9 @@ FOR a = 0 TO ln printText a, 0, 13, 1, CHR$(tehe(a)) NEXT a -printText 0, 1, 7, 0, "Do you want to simplify it (unfinished so press N)" -a = 0 -23 -clearScreenBuffer -a$ = INPUT$(1) -IF a$ = "n" OR a$ = "N" THEN GOTO 24 -IF a$ = "y" OR a$ = "Y" THEN ELSE GOTO 23 -a = 1 -24 printText 0, 1, 7, 0, SPACE$(79) -l = 0 -IF a = 1 THEN lihts 0, ln, l -lahend 0, ln - l +lahend 0, ln a$ = INPUT$(1) -- 2.20.1