From 3ebc41870128148b862c128f4c91639c9eb23c24 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 22 Jan 2017 16:16:32 -0800 Subject: 3737 --- html/081print.mu.html | 73 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 37 deletions(-) (limited to 'html/081print.mu.html') diff --git a/html/081print.mu.html b/html/081print.mu.html index cb658d20..33ddf53a 100644 --- a/html/081print.mu.html +++ b/html/081print.mu.html @@ -745,7 +745,7 @@ if ('onhashchange' in window) { 684 ] 685 ] 686 -687 def print-integer screen:&:screen, n:num -> screen:&:screen [ +687 def print screen:&:screen, n:num -> screen:&:screen [ 688 local-scope 689 load-ingredients 690 color:num, color-found?:bool <- next-ingredient @@ -765,44 +765,43 @@ if ('onhashchange' in window) { 704 screen <- print screen, s, color, bg-color 705 ] 706 -707 # for now, we can only print integers -708 def print screen:&:screen, n:num -> screen:&:screen [ -709 local-scope -710 load-ingredients -711 color:num, color-found?:bool <- next-ingredient -712 { -713 # default color to white -714 break-if color-found? -715 color <- copy 7/white -716 } -717 bg-color:num, bg-color-found?:bool <- next-ingredient -718 { -719 # default bg-color to black -720 break-if bg-color-found? -721 bg-color <- copy 0/black -722 } -723 screen <- print-integer screen, n, color, bg-color +707 def print screen:&:screen, n:bool -> screen:&:screen [ +708 local-scope +709 load-ingredients +710 color:num, color-found?:bool <- next-ingredient +711 { +712 # default color to white +713 break-if color-found? +714 color <- copy 7/white +715 } +716 bg-color:num, bg-color-found?:bool <- next-ingredient +717 { +718 # default bg-color to black +719 break-if bg-color-found? +720 bg-color <- copy 0/black +721 } +722 n2:num <- copy n +723 screen <- print screen, n2, color, bg-color 724 ] 725 -726 # addresses -727 def print screen:&:screen, n:&:_elem -> screen:&:screen [ -728 local-scope -729 load-ingredients -730 color:num, color-found?:bool <- next-ingredient -731 { -732 # default color to white -733 break-if color-found? -734 color <- copy 7/white -735 } -736 bg-color:num, bg-color-found?:bool <- next-ingredient -737 { -738 # default bg-color to black -739 break-if bg-color-found? -740 bg-color <- copy 0/black -741 } -742 n2:num <- copy n -743 screen <- print-integer screen, n2, color, bg-color -744 ] +726 def print screen:&:screen, n:&:_elem -> screen:&:screen [ +727 local-scope +728 load-ingredients +729 color:num, color-found?:bool <- next-ingredient +730 { +731 # default color to white +732 break-if color-found? +733 color <- copy 7/white +734 } +735 bg-color:num, bg-color-found?:bool <- next-ingredient +736 { +737 # default bg-color to black +738 break-if bg-color-found? +739 bg-color <- copy 0/black +740 } +741 n2:num <- copy n +742 screen <- print screen, n2, color, bg-color +743 ] -- cgit 1.4.1-2-gfad0