Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
general
stups
prob-teaching-notebooks
Commits
c4c4bcd2
Commit
c4c4bcd2
authored
Nov 25, 2020
by
Christopher Happe
Browse files
Feature: Ausgabe bei Abbruch des Programms
parent
3c80fe3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
info4/kapitel-8/Interpreter/gotointerpreter.py
View file @
c4c4bcd2
...
...
@@ -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
...
...
info4/kapitel-8/Interpreter/loopinterpreter.py
View file @
c4c4bcd2
...
...
@@ -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
...
...
info4/kapitel-8/Interpreter/whileinterpreter.py
View file @
c4c4bcd2
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment