diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 23:52:16 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 23:55:20 -0700 |
commit | f3bce7176bc15ec04739c61db0d189cbaaaca7d8 (patch) | |
tree | 47f680fa2a130ad9773b67d39d7e4e7b7b38907a /cpp/090debug | |
parent | f575154aeac5361b1ca467f0487f7126ea27e774 (diff) | |
download | mu-f3bce7176bc15ec04739c61db0d189cbaaaca7d8.tar.gz |
1065 - example program for closures
Diffstat (limited to 'cpp/090debug')
-rw-r--r-- | cpp/090debug | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/090debug b/cpp/090debug index b6acae9d..a2a74d18 100644 --- a/cpp/090debug +++ b/cpp/090debug @@ -8,14 +8,14 @@ assert(Next_recipe_number < _PRINT); case _PRINT: { if (isa_literal(instructions[pc].ingredients[0])) { trace("run") << "$print: " << instructions[pc].ingredients[0].name; - cout << instructions[pc].ingredients[0].name << '\n'; + cout << instructions[pc].ingredients[0].name; break; } vector<int> result(read_memory(instructions[pc].ingredients[0])); for (size_t i = 0; i < result.size(); ++i) { trace("run") << "$print: " << result[i]; - cout << result[i] << " "; + if (i > 0) cout << " "; + cout << result[i]; } - cout << '\n'; break; } |