From 7c9def3c5a35c07afdc95b383d6ff85a7c16ef0b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Sep 2016 00:06:04 -0700 Subject: 3376 - start maximally using all type abbreviations It might be too much, particularly if students start peeking inside .mu files early. But worth a shot for not just to iron out the kinks in the abbreviation system. --- 055shape_shifting_container.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '055shape_shifting_container.cc') diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc index ef165c91..26bb7467 100644 --- a/055shape_shifting_container.cc +++ b/055shape_shifting_container.cc @@ -52,9 +52,9 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] + 1:text <- new [abc] # compound types for type ingredients - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y + {2: (foo number (address array character))} <- merge 34/x, 1:text/y ] $error: 0 @@ -68,8 +68,8 @@ container bar:_a:_b [ {data: (foo _a (address _b))} ] def main [ - 1:address:array:character <- new [abc] - 2:bar:number:array:character <- merge 34/x, 1:address:array:character/y + 1:text <- new [abc] + 2:bar:number:array:character <- merge 34/x, 1:text/y ] $error: 0 @@ -278,10 +278,10 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y - 3:address:array:character <- get {2: (foo number (address array character))}, y:offset - 4:boolean <- equal 1:address:array:character, 3:address:array:character + 1:text <- new [abc] + {2: (foo number (address array character))} <- merge 34/x, 1:text/y + 3:text <- get {2: (foo number (address array character))}, y:offset + 4:boolean <- equal 1:text, 3:text ] +mem: storing 1 in location 4 -- cgit 1.4.1-2-gfad0