From dcc060c7d4ef56b978beb34ddce8d8ffcec94fa6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Feb 2016 17:17:20 -0800 Subject: 2706 - update html --- html/070text.mu.html | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'html/070text.mu.html') diff --git a/html/070text.mu.html b/html/070text.mu.html index a517c13f..4c802574 100644 --- a/html/070text.mu.html +++ b/html/070text.mu.html @@ -244,14 +244,18 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } local-scope x:address:shared:buffer <- new-buffer 3 s1:address:shared:array:character <- get *x, data:offset - x <- append x, 97 # 'a' - x <- append x, 98 # 'b' - x <- append x, 99 # 'c' + c:character <- copy 97/a + x <- append x, c + c:character <- copy 98/b + x <- append x, c + c:character <- copy 99/c + x <- append x, c s2:address:shared:array:character <- get *x, data:offset 1:boolean/raw <- equal s1, s2 2:array:character/raw <- copy *s2 +buffer-filled - x <- append x, 100 # 'd' + c:character <- copy 100/d + x <- append x, c s3:address:shared:array:character <- get *x, data:offset 10:boolean/raw <- equal s1, s3 11:number/raw <- get *x, length:offset @@ -281,9 +285,12 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } run [ local-scope x:address:shared:buffer <- new-buffer 3 - x <- append x, 97 # 'a' - x <- append x, 98 # 'b' - x <- append x, 8/backspace + c:character <- copy 97/a + x <- append x, c + c:character <- copy 98/b + x <- append x, c + c:character <- copy 8/backspace + x <- append x, c s:address:shared:array:character <- buffer-to-array x 1:array:character/raw <- copy *s ] @@ -325,7 +332,8 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } # add sign { break-unless negate-result:boolean - tmp <- append tmp, 45 # '-' + minus:character <- copy 45/- + tmp <- append tmp, minus } # reverse buffer into text result len:number <- get *tmp, length:offset @@ -354,6 +362,12 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } result <- to-text n ] +recipe to-text x:address:_elem -> result:address:shared:array:character [ + local-scope + load-ingredients + n:number <- copy x + result <- to-text n +] recipe buffer-to-array in:address:shared:buffer -> result:address:shared:array:character [ local-scope -- cgit 1.4.1-2-gfad0