Skip to content
Snippets Groups Projects
Commit c4c4bcd2 authored by Chris's avatar Chris
Browse files

Feature: Ausgabe bei Abbruch des Programms

parent 3c80fe3b
Branches
No related tags found
1 merge request!1Master
......@@ -273,6 +273,8 @@ class GOTOInterpreter:
return self.values.get('x0')
return 0
except KeyboardInterrupt:
print('Die Ausführung des Programms wurde unterbrochen.\n' +
'Daher ist der Rückgabewert des Programms nicht definiert.')
return -1
......
......@@ -243,6 +243,8 @@ class LOOPInterpreter:
return self.values.get('x0')
return 0
except KeyboardInterrupt:
print('Die Ausführung des Programms wurde unterbrochen.\n' +
'Daher ist der Rückgabewert des Programms nicht definiert.')
return -1
......
......@@ -178,6 +178,8 @@ class WHILEInterpreter(LOOPInterpreter):
return self.values.get('x0')
return 0
except KeyboardInterrupt:
print('Die Ausführung des Programms wurde unterbrochen.\n' +
'Daher ist der Rückgabewert des Programms nicht definiert.')
return -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment