Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
compilerconstruction
ssm
Commits
1c532f9f
Commit
1c532f9f
authored
Jun 05, 2014
by
Joost Rijneveld
Browse files
Added print() without newline, fixed font consistency
parent
ebc4a900
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/nl/uu/cs/ssm/Machine.java
View file @
1c532f9f
...
...
@@ -486,7 +486,7 @@ public class Machine
b
.
putInt
(
pop
());
try
{
messenger
.
print
ln
(
""
+
new
String
(
b
.
array
(),
"UTF-32BE"
)
)
;
messenger
.
print
(
""
+
new
String
(
b
.
array
(),
"UTF-32BE"
)
)
;
}
catch
(
UnsupportedEncodingException
e
)
{
...
...
src/nl/uu/cs/ssm/Messenger.java
View file @
1c532f9f
...
...
@@ -10,8 +10,8 @@ package nl.uu.cs.ssm ;
public
interface
Messenger
{
public
void
print
ln
(
String
s
)
;
public
void
print
(
String
s
)
;
public
void
println
(
String
s
);
/**
* Asks the user for an integer value (i.e. via a dialog)
* @return Returns the integer value as provided by the user
...
...
src/nl/uu/cs/ssmui/SSMRunner.java
View file @
1c532f9f
...
...
@@ -325,7 +325,7 @@ public class SSMRunner extends JFrame
outputScrollPane
.
setBorder
(
createTitledBorder
(
"Output"
));
outputTextArea
.
setVisible
(
true
);
outputTextArea
.
setEditable
(
false
);
outputTextArea
.
setFont
(
new
java
.
awt
.
Font
(
"SansSerif"
,
0
,
1
0
));
outputTextArea
.
setFont
(
new
java
.
awt
.
Font
(
"SansSerif"
,
0
,
1
2
));
setLocation
(
new
java
.
awt
.
Point
(
0
,
0
));
setFont
(
new
java
.
awt
.
Font
(
"SansSerif"
,
0
,
12
));
setJMenuBar
(
JMenuBar
);
...
...
@@ -650,13 +650,18 @@ public class SSMRunner extends JFrame
}
stepManager
.
endForwardStep
()
;
}
public
void
println
(
String
s
)
{
outputTextArea
.
append
(
s
)
;
outputTextArea
.
append
(
"\n"
)
;
}
public
void
print
(
String
s
)
{
outputTextArea
.
append
(
s
)
;
}
public
int
promptInt
()
{
while
(
true
)
...
...
Write
Preview
Markdown
is supported
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