Small fixes

This commit is contained in:
2025-10-06 11:11:27 +11:00
parent 8cc737962e
commit 883d3cd9b8
2 changed files with 7 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ from sys import argv
file = open(argv[1]).readlines(); file = open(argv[1]).readlines();
bfcode = "" bfcode = ""
def removeChar(str, char): def removeChar(str, char):
ans = 0 ans = ""
for i in str: for i in str:
if (i != char): if (i != char):
ans += i ans += i
@@ -23,10 +23,11 @@ def ord2(char):
for i in file: for i in file:
if (i.split(" ")[0] == "create"): if (i.split(" ")[0] == "create"):
i = removeEnd(i, 2) if (i[len(i)-1] == "\n"):
i = removeEnd(i, 1)
bfcode += ">>>>>>>>>>>>[[>>]>>]" bfcode += ">>>>>>>>>>>>[[>>]>>]"
bytes = int(i.split("*", 1)[1].split("=", 1)[0]) bytes = int(removeChar(i.split("*", 1)[1].split("=", 1)[0], " "))
a = i.split("=", 1)[1] a = i.split("=", 1)[1]
if (a[0] == " "): if (a[0] == " "):

View File

@@ -1,3 +1,3 @@
create str *5= "Hello, world!" create str *5 = "Hello, world!"
create str *5= "World, hello!" create str *5 = "World, hello!"
create str *6= "Sigma!" create str *6 = "Sigma!"