diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-12-28 08:44:36 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-12-28 08:44:36 -0800 |
commit | bbe0801ab1e0b0859c3529ed33fde40b139addd6 (patch) | |
tree | fa534bbbb3b345d154432746cd585f9262bd80cd /screen.mu | |
parent | e94453100dda87a42dee36b2671f850ab6824f54 (diff) | |
download | mu-bbe0801ab1e0b0859c3529ed33fde40b139addd6.tar.gz |
2548 - teach 'print' to print integers
Still can't print non-integer numbers, so this is a bit hacky. The big consequence is that you can't print literal characters anymore because of our rules about how we pick which variant to statically dispatch to. You have to save to a character variable first. Maybe I can add an annotation to literals..
Diffstat (limited to 'screen.mu')
-rw-r--r-- | screen.mu | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/screen.mu b/screen.mu index 665822ac..1061d191 100644 --- a/screen.mu +++ b/screen.mu @@ -5,7 +5,8 @@ recipe main [ open-console - print 0/screen, 97/a, 2/red + 10:character <- copy 97/a + print 0/screen, 10:character/a, 2/red 1:number/raw, 2:number/raw <- cursor-position 0/screen wait-for-event 0/console clear-screen 0/screen |