diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-24 18:32:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-24 18:32:18 -0700 |
commit | 5f0280a90dea8f3813f07b6a610254625c2d5b10 (patch) | |
tree | 83478cc195734ed5c118856614116599f2c66fb0 | |
parent | 3edb2d8c7d3915173d7265a2918e0bd18bef259f (diff) | |
download | mu-5f0280a90dea8f3813f07b6a610254625c2d5b10.tar.gz |
2998
-rw-r--r-- | 029tools.cc | 10 | ||||
-rw-r--r-- | 038new_text.cc | 2 |
2 files changed, 8 insertions, 4 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(); } diff --git a/038new_text.cc b/038new_text.cc index 9ddcbabe..90a2fd67 100644 --- a/038new_text.cc +++ b/038new_text.cc @@ -69,7 +69,7 @@ def main [ :(before "End print Special-cases(r, data)") if (is_mu_string(r)) { assert(scalar(data)); - return read_mu_string(data.at(0))+' '; + return read_mu_string(data.at(0)); } :(scenario unicode_string) |