about summary refs log tree commit diff stats
path: root/081print.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-01-22 12:05:24 -0800
committerKartik K. Agaram <vc@akkartik.com>2017-01-22 12:05:24 -0800
commitab6e672d4e0a0bf92254df59f0cd8c66492a8ad0 (patch)
treecb73b9bec6e3583ba09a3183e0b786cc14141d21 /081print.mu
parent42f08f13b2fbbaab65783124553ac3022af8fa02 (diff)
downloadmu-ab6e672d4e0a0bf92254df59f0cd8c66492a8ad0.tar.gz
3735 - get rid of 'print-integer'
We do support printing non-integer numbers for some time, albeit using
the underlying host platform.
Diffstat (limited to '081print.mu')
-rw-r--r--081print.mu23
1 files changed, 2 insertions, 21 deletions
diff --git a/081print.mu b/081print.mu
index 474e4c31..77f295a5 100644
--- a/081print.mu
+++ b/081print.mu
@@ -684,7 +684,7 @@ scenario print-text-stops-at-right-margin [
   ]
 ]
 
-def print-integer screen:&:screen, n:num -> screen:&:screen [
+def print screen:&:screen, n:num -> screen:&:screen [
   local-scope
   load-ingredients
   color:num, color-found?:bool <- next-ingredient
@@ -704,25 +704,6 @@ def print-integer screen:&:screen, n:num -> screen:&:screen [
   screen <- print screen, s, color, bg-color
 ]
 
-# for now, we can only print integers
-def print screen:&:screen, n:num -> screen:&:screen [
-  local-scope
-  load-ingredients
-  color:num, color-found?:bool <- next-ingredient
-  {
-    # default color to white
-    break-if color-found?
-    color <- copy 7/white
-  }
-  bg-color:num, bg-color-found?:bool <- next-ingredient
-  {
-    # default bg-color to black
-    break-if bg-color-found?
-    bg-color <- copy 0/black
-  }
-  screen <- print-integer screen, n, color, bg-color
-]
-
 # addresses
 def print screen:&:screen, n:&:_elem -> screen:&:screen [
   local-scope
@@ -740,5 +721,5 @@ def print screen:&:screen, n:&:_elem -> screen:&:screen [
     bg-color <- copy 0/black
   }
   n2:num <- copy n
-  screen <- print-integer screen, n2, color, bg-color
+  screen <- print screen, n2, color, bg-color
 ]