From 0b82eef7140123e29e2628232e3cc7f740d094f2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 18 Apr 2015 20:11:59 -0700 Subject: 1099 - new recipe: convert integer to decimal string --- cpp/024compare | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cpp/024compare') diff --git a/cpp/024compare b/cpp/024compare index f39f4941..1484649b 100644 --- a/cpp/024compare +++ b/cpp/024compare @@ -93,11 +93,11 @@ recipe main [ +mem: storing 0 in location 3 :(before "End Primitive Recipe Declarations") -LESSER_THAN, +LESS_THAN, :(before "End Primitive Recipe Numbers") -Recipe_number["lesser-than"] = LESSER_THAN; +Recipe_number["less-than"] = LESS_THAN; :(before "End Primitive Recipe Implementations") -case LESSER_THAN: { +case LESS_THAN: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; vector arg0 = read_memory(instructions[pc].ingredients[0]); assert(arg0.size() == 1); @@ -111,11 +111,11 @@ case LESSER_THAN: { break; } -:(scenario "lesser_than") +:(scenario "less_than") recipe main [ 1:integer <- copy 32:literal 2:integer <- copy 33:literal - 3:integer <- lesser-than 1:integer, 2:integer + 3:integer <- less-than 1:integer, 2:integer ] +run: instruction main/2 +run: ingredient 0 is 1 @@ -125,11 +125,11 @@ recipe main [ +run: product 0 is 1 +mem: storing 1 in location 3 -:(scenario "lesser_than2") +:(scenario "less_than2") recipe main [ 1:integer <- copy 34:literal 2:integer <- copy 33:literal - 3:integer <- lesser-than 1:integer, 2:integer + 3:integer <- less-than 1:integer, 2:integer ] +run: instruction main/2 +run: ingredient 0 is 1 -- cgit 1.4.1-2-gfad0