From 5fe060d582d4a82444243a28b18085c971a85628 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 27 Jul 2018 17:07:52 -0700 Subject: 4447 --- html/061text.mu.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'html/061text.mu.html') diff --git a/html/061text.mu.html b/html/061text.mu.html index d069e621..2c115a45 100644 --- a/html/061text.mu.html +++ b/html/061text.mu.html @@ -15,16 +15,16 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } +.muControl { color: #c0a020; } .muRecipe { color: #ff8700; } -.muScenario { color: #00af00; } .Special { color: #c00000; } .Delimiter { color: #800080; } +.muData { color: #ffff00; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } .Constant { color: #00a0a0; } .LineNr { color: #444444; } -.muControl { color: #c0a020; } -.muData { color: #ffff00; } +.muScenario { color: #00af00; } --> @@ -64,17 +64,17 @@ if ('onhashchange' in window) { 3 def equal a:text, b:text -> result:bool [ 4 local-scope 5 load-inputs - 6 an:num, bn:num <- copy a, b + 6 an:num, bn:num <- deaddress a, b 7 address-equal?:boolean <- equal an, bn - 8 return-if address-equal?, 1/true - 9 return-unless a, 0/false - 10 return-unless b, 0/false + 8 return-if address-equal?, true + 9 return-unless a, false + 10 return-unless b, false 11 a-len:num <- length *a 12 b-len:num <- length *b 13 # compare lengths 14 trace 99, [text-equal], [comparing lengths] 15 length-equal?:bool <- equal a-len, b-len - 16 return-unless length-equal?, 0/false + 16 return-unless length-equal?, false 17 # compare each corresponding character 18 trace 99, [text-equal], [comparing characters] 19 i:num <- copy 0 @@ -84,11 +84,11 @@ if ('onhashchange' in window) { 23 a2:char <- index *a, i 24 b2:char <- index *b, i 25 chars-match?:bool <- equal a2, b2 - 26 return-unless chars-match?, 0/false + 26 return-unless chars-match?, false 27 i <- add i, 1 28 loop 29 } - 30 return 1/true + 30 return true 31 ] 32 33 scenario text-equal-reflexive [ @@ -147,10 +147,10 @@ if ('onhashchange' in window) { 86 scenario text-equal-with-null [ 87 local-scope 88 x:text <- new [abcd] - 89 y:text <- copy 0 + 89 y:text <- copy null 90 run [ - 91 10:bool/raw <- equal x, 0 - 92 11:bool/raw <- equal 0, x + 91 10:bool/raw <- equal x, null + 92 11:bool/raw <- equal null, x 93 12:bool/raw <- equal x, y 94 13:bool/raw <- equal y, x 95 14:bool/raw <- equal y, y @@ -400,7 +400,7 @@ if ('onhashchange' in window) { 339 local-scope 340 load-inputs 341 # propagate null buffer - 342 return-unless in, 0 + 342 return-unless in, null 343 len:num <- get *in, length:offset 344 s:&:@:_elem <- get *in, data:offset 345 # we can't just return s because it is usually the wrong length @@ -419,7 +419,7 @@ if ('onhashchange' in window) { 358 def blank? x:&:@:_elem -> result:bool [ 359 local-scope 360 load-inputs - 361 return-unless x, 1/true + 361 return-unless x, true 362 len:num <- length *x 363 result <- equal len, 0 364 ] @@ -467,7 +467,7 @@ if ('onhashchange' in window) { 406 407 scenario text-append-null [ 408 local-scope - 409 x:text <- copy 0 + 409 x:text <- copy null 410 y:text <- new [ world!] 411 run [ 412 z:text <- append x, y @@ -481,7 +481,7 @@ if ('onhashchange' in window) { 420 scenario text-append-null-2 [ 421 local-scope 422 x:text <- new [hello,] - 423 y:text <- copy 0 + 423 y:text <- copy null 424 run [ 425 z:text <- append x, y 426 10:@:char/raw <- copy *z @@ -1058,7 +1058,7 @@ if ('onhashchange' in window) { 997 x:num <- length *text 998 x <- subtract x, pattern-len 999 enough-room?:bool <- lesser-or-equal idx, x -1000 return-unless enough-room?, 0/not-found +1000 return-unless enough-room?, false/not-found 1001 # check each character of pattern 1002 pattern-idx:num <- copy 0 1003 { @@ -1067,12 +1067,12 @@ if ('onhashchange' in window) { 1006 c:char <- index *text, idx 1007 exp:char <- index *pattern, pattern-idx 1008 match?:bool <- equal c, exp -1009 return-unless match?, 0/not-found +1009 return-unless match?, false/not-found 1010 idx <- add idx, 1 1011 pattern-idx <- add pattern-idx, 1 1012 loop 1013 } -1014 return 1/found +1014 return true/found 1015 ] 1016 1017 scenario match-at-checks-pattern-at-index [ -- cgit 1.4.1-2-gfad0