about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--073scheduler.cc1
-rw-r--r--args.mu8
2 files changed, 9 insertions, 0 deletions
diff --git a/073scheduler.cc b/073scheduler.cc
index 41240e64..5f97220b 100644
--- a/073scheduler.cc
+++ b/073scheduler.cc
@@ -133,6 +133,7 @@ void run_main(int argc, char* argv[]) {
   Current_routine = main_routine;
   for (int i = 1;  i < argc;  ++i) {
     vector<double> arg;
+    arg.push_back(/*alloc id*/0);
     arg.push_back(new_mu_text(argv[i]));
     assert(get(Memory, arg.back()) == 0);
     current_call().ingredient_atoms.push_back(arg);
diff --git a/args.mu b/args.mu
new file mode 100644
index 00000000..3726f097
--- /dev/null
+++ b/args.mu
@@ -0,0 +1,8 @@
+# To provide commandline args to a Mu program, use '--'. In this case:
+#   $ ./mu args.mu -- abc
+#   abc
+def main text:text [
+  local-scope
+  load-inputs
+  $print text 10/newline
+]