Skip to content

Commit 217ee1e

Browse files
committed
Fixed Bug: To allow nested loops
1 parent a7868fd commit 217ee1e

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

NumberScript/interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def interpret(self, code: str, variables_dict: dict = {}) -> str:
235235
pass
236236

237237
if code[j].startswith("6"):
238-
recode = code[j].replace("6", "", 1).split("\\")
238+
recode = code[j].replace("6", "", 1).split("\\", 2)
239239
repeat_name = variables[recode[0]] if recode[0] in variables.keys() else recode[0]
240240
repeat_times = int(variables[recode[1]]) if recode[1] in variables.keys() else int(recode[1])
241241
repeat_code = recode[2].replace(";", " ")

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ Here is another program where it loops over digits to check if it's lucky
6363
1
6464
```
6565

66-
>Also don't try to do nested loops. If-Else is fine but no Nested Loops.
67-
6866
You can find more examples in the examples folder.
6967

7068
>So, since there aren't any spaces what can we use instead of them?

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="NumberScript",
8-
version="1.9.1",
8+
version="1.9.2",
99
description="possibly the world's most simplest and restricted language.",
1010
author="Sasen Perera",
1111
long_description=longest_description,

0 commit comments

Comments
 (0)