Skip to content

Commit

Permalink
Don't print destination if it is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Klimek committed Dec 7, 2016
1 parent a3a78ac commit 1005841
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/arden/runtime/StdIOExecutionContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public StdIOExecutionContext(CommandLineOptions options) {

@Override
public DatabaseQuery createQuery(MedicalLogicModule mlm, String mapping) {
System.out.println("Query mapping: \"" + mapping + "\". Enter result as " + "Arden Syntax constant (Strings in quotes)");
System.out.println(
"Query mapping: \"" + mapping + "\". Enter result as " + "Arden Syntax constant (Strings in quotes)");
System.out.print(PROMPT_SIGN);

ArdenValue[] val = null;
Expand Down Expand Up @@ -99,10 +100,13 @@ public void write(ArdenValue message, ArdenValue destination, double urgency) {
System.out.println(message);
}
} else {
// prepend destination to printed string
System.out.print("Destination: ");
System.out.print(destination);
System.out.print(" Message: ");
if (destination != null) {
// prepend destination to printed string
System.out.print("Destination: ");
System.out.print(destination);
System.out.print(" ");
}
System.out.print("Message: ");
if (message instanceof ArdenString) {
System.out.println(ArdenString.getStringFromValue(message));
} else {
Expand Down

0 comments on commit 1005841

Please sign in to comment.