about summary refs log tree commit diff stats
path: root/029tools.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-24 18:32:18 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-24 18:32:18 -0700
commit5f0280a90dea8f3813f07b6a610254625c2d5b10 (patch)
tree83478cc195734ed5c118856614116599f2c66fb0 /029tools.cc
parent3edb2d8c7d3915173d7265a2918e0bd18bef259f (diff)
downloadmu-5f0280a90dea8f3813f07b6a610254625c2d5b10.tar.gz
2998
Diffstat (limited to '029tools.cc')
-rw-r--r--029tools.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/029tools.cc b/029tools.cc
index a7657140..c9700752 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -32,6 +32,7 @@ case TRACE: {
   string label = current_instruction().ingredients.at(1).name;
   ostringstream out;
   for (int i = 2; i < SIZE(current_instruction().ingredients); ++i) {
+    if (i > 2) out << ' ';
     out << print_mu(current_instruction().ingredients.at(i), ingredients.at(i));
   }
   trace(depth, label) << out.str() << end();
@@ -52,6 +53,7 @@ case STASH: {
 case STASH: {
   ostringstream out;
   for (int i = 0; i < SIZE(current_instruction().ingredients); ++i) {
+    if (i) out << ' ';
     out << print_mu(current_instruction().ingredients.at(i), ingredients.at(i));
   }
   trace(2, "app") << out.str() << end();
@@ -80,11 +82,13 @@ def main [
 :(code)
 string print_mu(const reagent& r, const vector<double>& data) {
   if (is_literal(r))
-    return r.name+' ';
+    return r.name;
   // End print Special-cases(r, data)
   ostringstream out;
-  for (long long i = 0; i < SIZE(data); ++i)
-    out << no_scientific(data.at(i)) << ' ';
+  for (long long i = 0; i < SIZE(data); ++i) {
+    if (i) out << ' ';
+    out << no_scientific(data.at(i));
+  }
   return out.str();
 }