From 3e1349d29fa00db1fab3a811b60bc9d8de0355e4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 30 Sep 2016 10:45:14 -0700 Subject: 3431 Improvements to syntax highlighting, particularly for Mu code in C++ files. --- html/022arithmetic.cc.html | 89 +++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'html/022arithmetic.cc.html') diff --git a/html/022arithmetic.cc.html b/html/022arithmetic.cc.html index 476f505a..c8fefec6 100644 --- a/html/022arithmetic.cc.html +++ b/html/022arithmetic.cc.html @@ -15,6 +15,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } .Special { color: #c00000; } +.muRecipe { color: #ff8700; } .traceContains { color: #008000; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } @@ -70,13 +71,13 @@ put(Recipe_ordinal,} :(scenario add_literal) -def main [ +def main [ 1:num <- add 23, 34 ] +mem: storing 57 in location 1 :(scenario add) -def main [ +def main [ 1:num <- copy 23 2:num <- copy 34 3:num <- add 1:num, 2:num @@ -84,21 +85,21 @@ def main [ +mem: storing 57 in location 3 :(scenario add_multiple) -def main [ +def main [ 1:num <- add 3, 4, 5 ] +mem: storing 12 in location 1 :(scenario add_checks_type) % Hide_errors = true; -def main [ +def main [ 1:num <- add 2:bool, 1 ] +error: main: 'add' requires number ingredients, but got '2:bool' :(scenario add_checks_return_type) % Hide_errors = true; -def main [ +def main [ 1:address:num <- add 2, 2 ] +error: main: 'add' should yield a number, but got '1:address:num' @@ -145,13 +146,13 @@ put(Recipe_ordinal,} :(scenario subtract_literal) -def main [ +def main [ 1:num <- subtract 5, 2 ] +mem: storing 3 in location 1 :(scenario subtract) -def main [ +def main [ 1:num <- copy 23 2:num <- copy 34 3:num <- subtract 1:num, 2:num @@ -159,7 +160,7 @@ def main [ +mem: storing -11 in location 3 :(scenario subtract_multiple) -def main [ +def main [ 1:num <- subtract 6, 3, 2 ] +mem: storing 1 in location 1 @@ -198,13 +199,13 @@ put(Recipe_ordinal,} :(scenario multiply_literal) -def main [ +def main [ 1:num <- multiply 2, 3 ] +mem: storing 6 in location 1 :(scenario multiply) -def main [ +def main [ 1:num <- copy 4 2:num <- copy 6 3:num <- multiply 1:num, 2:num @@ -212,7 +213,7 @@ def main [ +mem: storing 24 in location 3 :(scenario multiply_multiple) -def main [ +def main [ 1:num <- multiply 2, 3, 4 ] +mem: storing 24 in location 1 @@ -254,13 +255,13 @@ put(Recipe_ordinal,} :(scenario divide_literal) -def main [ +def main [ 1:num <- divide 8, 2 ] +mem: storing 4 in location 1 :(scenario divide) -def main [ +def main [ 1:num <- copy 27 2:num <- copy 3 3:num <- divide 1:num, 2:num @@ -268,7 +269,7 @@ def main [ +mem: storing 9 in location 3 :(scenario divide_multiple) -def main [ +def main [ 1:num <- divide 12, 3, 2 ] +mem: storing 2 in location 1 @@ -322,14 +323,14 @@ put(Recipe_ordinal,} :(scenario divide_with_remainder_literal) -def main [ +def main [ 1:num, 2:num <- divide-with-remainder 9, 2 ] +mem: storing 4 in location 1 +mem: storing 1 in location 2 :(scenario divide_with_remainder) -def main [ +def main [ 1:num <- copy 27 2:num <- copy 11 3:num, 4:num <- divide-with-remainder 1:num, 2:num @@ -338,20 +339,20 @@ def main [ +mem: storing 5 in location 4 :(scenario divide_with_decimal_point) -def main [ +def main [ 1:num <- divide 5, 2 ] +mem: storing 2.5 in location 1 :(scenario divide_by_zero) -def main [ +def main [ 1:num <- divide 4, 0 ] +mem: storing inf in location 1 :(scenario divide_by_zero_2) % Hide_errors = true; -def main [ +def main [ 1:num <- divide-with-remainder 4, 0 ] # integer division can't return floating-point infinity @@ -399,32 +400,32 @@ put(Recipe_ordinal,} :(scenario shift_left_by_zero) -def main [ +def main [ 1:num <- shift-left 1, 0 ] +mem: storing 1 in location 1 :(scenario shift_left_1) -def main [ +def main [ 1:num <- shift-left 1, 4 ] +mem: storing 16 in location 1 :(scenario shift_left_2) -def main [ +def main [ 1:num <- shift-left 3, 2 ] +mem: storing 12 in location 1 :(scenario shift_left_by_negative) % Hide_errors = true; -def main [ +def main [ 1:num <- shift-left 3, -1 ] +error: main: second ingredient can't be negative in '1:num <- shift-left 3, -1' :(scenario shift_left_ignores_fractional_part) -def main [ +def main [ 1:num <- divide 3, 2 2:num <- shift-left 1:num, 1 ] @@ -470,32 +471,32 @@ put(Recipe_ordinal,} :(scenario shift_right_by_zero) -def main [ +def main [ 1:num <- shift-right 1, 0 ] +mem: storing 1 in location 1 :(scenario shift_right_1) -def main [ +def main [ 1:num <- shift-right 1024, 1 ] +mem: storing 512 in location 1 :(scenario shift_right_2) -def main [ +def main [ 1:num <- shift-right 3, 1 ] +mem: storing 1 in location 1 :(scenario shift_right_by_negative) % Hide_errors = true; -def main [ +def main [ 1:num <- shift-right 4, -1 ] +error: main: second ingredient can't be negative in '1:num <- shift-right 4, -1' :(scenario shift_right_ignores_fractional_part) -def main [ +def main [ 1:num <- divide 3, 2 2:num <- shift-right 1:num, 1 ] @@ -536,25 +537,25 @@ put(Recipe_ordinal,} :(scenario and_bits_1) -def main [ +def main [ 1:num <- and-bits 8, 3 ] +mem: storing 0 in location 1 :(scenario and_bits_2) -def main [ +def main [ 1:num <- and-bits 3, 2 ] +mem: storing 2 in location 1 :(scenario and_bits_3) -def main [ +def main [ 1:num <- and-bits 14, 3 ] +mem: storing 2 in location 1 :(scenario and_bits_negative) -def main [ +def main [ 1:num <- and-bits -3, 4 ] +mem: storing 4 in location 1 @@ -594,19 +595,19 @@ put(Recipe_ordinal,} :(scenario or_bits_1) -def main [ +def main [ 1:num <- or-bits 3, 8 ] +mem: storing 11 in location 1 :(scenario or_bits_2) -def main [ +def main [ 1:num <- or-bits 3, 10 ] +mem: storing 11 in location 1 :(scenario or_bits_3) -def main [ +def main [ 1:num <- or-bits 4, 6 ] +mem: storing 6 in location 1 @@ -646,19 +647,19 @@ put(Recipe_ordinal,} :(scenario xor_bits_1) -def main [ +def main [ 1:num <- xor-bits 3, 8 ] +mem: storing 11 in location 1 :(scenario xor_bits_2) -def main [ +def main [ 1:num <- xor-bits 3, 10 ] +mem: storing 9 in location 1 :(scenario xor_bits_3) -def main [ +def main [ 1:num <- xor-bits 4, 6 ] +mem: storing 2 in location 1 @@ -697,25 +698,25 @@ put(Recipe_ordinal,} :(scenario flip_bits_zero) -def main [ +def main [ 1:num <- flip-bits 0 ] +mem: storing -1 in location 1 :(scenario flip_bits_negative) -def main [ +def main [ 1:num <- flip-bits -1 ] +mem: storing 0 in location 1 :(scenario flip_bits_1) -def main [ +def main [ 1:num <- flip-bits 3 ] +mem: storing -4 in location 1 :(scenario flip_bits_2) -def main [ +def main [ 1:num <- flip-bits 12 ] +mem: storing -13 in location 1 @@ -744,7 +745,7 @@ put(Recipe_ordinal,} :(scenario round_to_nearest_integer) -def main [ +def main [ 1:num <- round 12.2 ] +mem: storing 12 in location 1 -- cgit 1.4.1-2-gfad0