diff options
Diffstat (limited to 'archive/1.vm/console.mu')
-rw-r--r-- | archive/1.vm/console.mu | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/archive/1.vm/console.mu b/archive/1.vm/console.mu new file mode 100644 index 00000000..cc81c232 --- /dev/null +++ b/archive/1.vm/console.mu @@ -0,0 +1,16 @@ +# example program: reading events from keyboard or mouse +# +# Keeps printing 'a' until you press a key or click on the mouse. + +def main [ + local-scope + open-console + { + e:event, found?:bool <- check-for-interaction + break-if found? + print-character-to-display 97, 7/white + loop + } + close-console + $print e, 10/newline +] |