diff options
author | Ian Johnson <ian.johnson@appliedlanguage.com> | 2013-11-13 18:53:07 +0400 |
---|---|---|
committer | Ian Johnson <ian.johnson@appliedlanguage.com> | 2013-11-13 18:53:07 +0400 |
commit | 5425bdcc53176bfa89cf50eb7d7be2bd4c416a5c (patch) | |
tree | 0e51310b511dca992da82d66ea6d238baba50a68 /examples | |
parent | 4a00214cc8703307df99bb4081459729cfa581ab (diff) |
Re-factored variable and function name generation. And started documenting the imperative PCL syntax.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/let_binding/let_binding.pcl | 3 | ||||
-rw-r--r-- | examples/parallel_sleep/sleep.pcl | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/examples/let_binding/let_binding.pcl b/examples/let_binding/let_binding.pcl index 7e68e74..4f1fac2 100644 --- a/examples/let_binding/let_binding.pcl +++ b/examples/let_binding/let_binding.pcl @@ -7,7 +7,8 @@ component let_binding output filename.new configuration working.directory do - # Create the pathname of the re-encoded corpus + basename <- list.cons() + # Create the new pathname result <- let basename <- path.basename(filename) pieces <- path.splitext(basename) diff --git a/examples/parallel_sleep/sleep.pcl b/examples/parallel_sleep/sleep.pcl index 038b108..4ff87b2 100644 --- a/examples/parallel_sleep/sleep.pcl +++ b/examples/parallel_sleep/sleep.pcl @@ -18,16 +18,13 @@ # import pcl.system.process as process import pcl.util.list as list -import pcl.util.string as string component sleep input sleep_time output complete configuration sleep_command do - cmd.list <- list.cons() - list.append(cmd.list, @sleep_command) - list.append(cmd.list, sleep_time) - cmd.line <- string.join(cmd.list, " ") - process.callAndCheck(cmd.line) + cmd <- list.cons(@sleep_command, sleep_time) + process.callAndCheck(cmd) + return complete <- True |